<template>
	<view class="special-group">
		<view class="go-home" @click="backHome">
			<image :src="imglink + 'home/home-Selected.png'" mode=""></image>
		</view>
		<!-- 团购活动课程轮播图 -->
		<view class="special-group-swiper">
			 <view class="" v-if="list.image.length != 0">
			 	<swiper class="swiper" :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration" v-if="list.image.length != 0">
			 		<swiper-item class="discounts-page" v-for="(item,index) in list.image" :key='index'>
			 			<image :src="item"  style="width: 100%;height: 100%;"></image>
						<view class="" v-if="index == 0">
							封面
						</view>
			 		</swiper-item>
			 	</swiper>
			 </view>
			 <view class="choose-img">
			 	<view class="choose-swiper-img">
			 		请选择封面轮播图（最少1张，最多2张，第1张是封面）
			 	</view>
				<view class="choose-img-details">
					<view class="choose-img-common" @click="upLoadImg('0')" v-if="list.image.length == 0">
						<image class="updata-img" :src="imglink + 'member/manage_icon_camera.png'" mode=""></image>
						<view class="upload-img">
							+上传图片
						</view>
						<view class="img-num">
							1
						</view>
					</view>
					<view class="choose-img-common" v-else>
						<image class="choose-img-detail" :src="list.image[0]" mode="" style="width: 100%;height: 100%;margin: 0;"></image>
						<view class="masking"></view>
						<view class="img-num">1</view>
						<view class="updata" @click="replaceClcik(0)">
							更换照片
						</view>
						<image class="delete-upload-imf" :src="imglink + 'member/manage-active_icon_delete.png'" mode=""  @click="delSwiper('0')"></image>
					</view>
					<view class="choose-img-common" @click="upLoadImg('1')" v-if="list.image.length <=1">
						<image class="updata-img" :src="imglink + 'member/manage_icon_camera.png'" mode=""></image>
						<view class="upload-img">
							+上传图片
						</view>
						<view class="img-num">
							2
						</view>
					</view>
					<view class="choose-img-common" v-else>
						<image class="choose-img-detail" :src="list.image[1]" mode="" style="width: 100%;height: 100%;margin: 0;"></image>
						<view class="masking"></view>
						<view class="img-num">
							2
						</view>
						<view class="updata" @click="replaceClcik(1)">
							更换照片
						</view>
						<image class="delete-upload-imf" :src="imglink + 'member/manage-active_icon_delete.png'" mode="" @click="delSwiper('1')"></image>
					</view>
					<!-- <view class="choose-img-common"  @click="upLoadImg('2')" v-if="list.image.length <=2">
						<image class="updata-img" :src="imglink + 'member/manage_icon_camera.png'" mode=""></image>
						<view class="upload-img">
							+上传图片
						</view>
						<view class="img-num">
							3
						</view>
					</view>
					<view class="choose-img-common" v-else>
						<image class="choose-img-detail" :src="list.image[2]" mode="" style="width: 100%;height: 100%;margin: 0;"></image>
						<view class="masking"></view>
						<view class="img-num">
							3
						</view>
						<view class="updata" @click="replaceClcik(2)">
							更换照片
						</view>
						<image class="delete-upload-imf" :src="imglink + 'member/manage-active_icon_delete.png'" mode=""  @click="delSwiper('2')"></image>
					</view>
					<view class="choose-img-common"  @click="upLoadImg('3')" v-if="list.image.length <=3">
						<image class="updata-img" :src="imglink + 'member/manage_icon_camera.png'" mode=""></image>
						<view class="upload-img">
							+上传图片
						</view>
						<view class="img-num">
							4
						</view>
					</view>
					<view class="choose-img-common" v-else>
						<image class="choose-img-detail" :src="list.image[3]" mode="" style="width: 100%;height: 100%;margin: 0;"></image>
						<view class="masking"></view>
						<view class="img-num">
							4
						</view>
						<view class="updata" @click="replaceClcik(3)">
							更换照片
						</view>
						<image class="delete-upload-imf" :src="imglink + 'member/manage-active_icon_delete.png'" mode="" @click="delSwiper('3')"></image>
					</view> -->
				</view>
			 </view>
		</view>
		
		<!-- 活动标题与时间设置 -->
		<view class="act-time-title">
			<view class="explain-title">
				<view class=""></view>
				<view class="">
					活动标题
				</view>
			</view>
			<view class="act-title-tip">
				<textarea v-model="list.name" placeholder="活动标题最多50个字" maxlength='40' @input="actTitleInput" />
				<view class="">{{data.titleNum}}/40</view>
			</view>
			<view class="explain-title" style="margin-top: 40upx;">
				<view class=""></view>
				<view class="">
					活动时间设置
				</view>
			</view>
			<view class="act-time-set">
				<view class="">
					开始时间
				</view>
				<view class="start-data">
					<picker mode="date" v-model="list.startDate" @change="dateStartChange">
					    <view>{{list.startDate}}</view>
					</picker>
				</view>
				<view class="start-time">
					<picker mode="time" :value="list.startTime" @change="timeStartChange">
					    <view>{{list.startTime}}</view>
					</picker>
				</view>
			</view>
			<view class="act-time-set">
				<view class="">
					结束时间
				</view>
				<view class="start-data">
					<picker mode="date" :value="list.endDate" @change="dateEndChange">
					    <view>{{list.endDate}}</view>
					</picker>
				</view>
				<view class="start-time">
					<picker mode="time" :value="list.endTime" @change="timeEndChange">
					    <view>{{list.endTime}}</view>
					</picker>
				</view>
			</view>
		</view>
		<!-- 活动背景音乐设置 -->
		<view class="act-time-title">
			<view class="explain-title">
				<view class=""></view>
				<view class="">
					活动背景音乐设置
				</view>
			</view>
			<view class="act-time-set">
				<view class="">
					活动背景音乐
				</view>
				<view class="explain_tip">
					<switch :checked='list.music == 1' @change="switchMusic"  color="#FF8B46" style="text-align: center; margin-left: 180upx;"/>
				</view>
			</view>
			
		</view>
		<!-- 活动科目选择 -->
		<view class="act-time-title">
			<view class="explain-title">
				<view class=""></view>
				<view class="">
					活动科目选择
				</view>
			</view>
			<view class="" style="margin-top: 20upx; background-color:#f5f5f5; padding-top: 15upx; padding-left: 20upx;">
				<view class="account-selection" v-for="( item,index ) in subjects" :key="index" @click="checkbox(item)">
					<image style="width: 40upx; height: 40upx;" :src="subjectId == item.id ? opt : noopt" mode=""></image>
					<view style="display: inline-block; vertical-align: top; margin: 0upx 10upx;">{{item.name}}</view>
				</view>
			</view>
		</view>
		<!-- 活动课程设置 -->
		<view class="act-course-set">
			<view class="explain-title">
				<view class=""></view>
				<view class="">
					活动课程设置
				</view>
			</view>
			<view class="act-title">
				<view class="">
					活动科目名额设定
				</view>
				<input type="number" v-model="list.allowed_total" placeholder="请输入活动科目总名额" />
			</view>
			<!-- <view class="add-num">
				<view class="">
					<text>剩余20%自动增加名额(每次增加20个）</text>
					<switch :checked="data.addNum" @change="switch1ChangeNum" color="#FF8B46"/>
				</view>
				<view class="">
					开启后,活动名额低于20%时，系统将自动增加20个名额
				</view>
			</view> -->
			<view class="virtual-join">
				<view class="">
					<view class="">
						默认虚拟报名科目数
					</view>
					<input type="number" v-model="list.virtual_total" placeholder="请输入虚拟的报名科目数"/>
				</view>
				<view class="">
					激发用户从众心理，报名人数=默认虚拟报名科目+实际报名数
				</view>
			</view>
<!-- 			<view class="buy-course-count">
				<view class="buy-course-count-set">
					<view class="">
						<text>每人限购课程数量</text>
						<switch :checked='data.isLimit' @change="switch1ChangeLimit" color="#FF8B46"/>
					</view>
					<view class="buy-course-amount">
						<image :src="imglink + 'home/reduce_black.png'" mode="" @click="reduceCourseNum('1')"></image>
						<view class="">{{list.allowed_purchase_quantity}}</view>
						<image :src="imglink + 'home/add-colours.png'" mode="" @click="addCourseNum('1')"></image>
					</view>
				</view>
				<view class="">
					开启限购数量，每个用户活动报名科目数不能超过设定数量
				</view>
			</view> -->
		</view>
		<!-- 买课赠课福利设置 -->
		<view class="give-course-coupon">
			<view class="act_explain-title">
				<view class="explain-title" style="margin-top: 12upx;">
					<view class=""></view>
					<view class="">
						买课赠课福利设置
					</view>
				</view>
				<view class="explain_tip">
					<switch :checked='data.isGiveCourse' @change="switch1ChangeCourse" color="#FF8B46"/>
				</view>
			</view>
			<view class="give-course-tip">
				开启后，家长本活动买满几课程，可以免费送几课程，谨慎操作
			</view>
			<view class="buy-give-course" v-if="data.isGiveCourse">
				例：买<text>3</text>个课程送<text>1</text>个课程
			</view>
			<view class="buy-give-course-num" v-if="data.isGiveCourse">
				<view class="buy-give-course-details">
					<text>买</text>
					<view class="">
						<image :src="imglink + 'home/reduce_black.png'" mode="" @click="reduceCourseNum('2')"></image>
						<view class="">{{list.purchase_course}}</view>
						<image :src="imglink + 'home/add-colours.png'" mode="" @click="addCourseNum('2')"></image>
					</view>
					<text>课</text>
				</view>
				<view class="buy-give-course-details" style="margin-left: 100upx;">
					<text>送</text>
					<view class="">
						<image :src="imglink + 'home/reduce_black.png'" mode="" @click="reduceCourseNum('3')"></image>
						<view class="">{{list.give_course}}</view>
						<image :src="imglink + 'home/add-colours.png'" mode="" @click="addCourseNum('3')"></image>
					</view>
					<text>课</text>
				</view>
			</view>
		</view>
		<!-- 拼团设置 -->
		<view class="group-set" v-if="page_type == 'group'">
			<view class="explain-title">
				<view class=""></view>
				<view class="">
					拼团设置
				</view>
			</view>
			<view class="clustering-num">
				<view class="">成团人数</view>
				<input v-if="editAct.participants>0" type="number" v-model="list.quanlity_group_purchase" placeholder="请输入成团人数，最少2人" disabled  />				
				<input v-else type="number" v-model="list.quanlity_group_purchase" placeholder="请输入成团人数，最少2人"/>
				
				
			</view>
			<view v-if="editAct.participants>0" class="is-open-group-tip">
				已有家长报名，不能再修改
			</view>
			<view class="is-open-group">
				<view class="is-open-group-content">
					<view class="is-open-group-choose">
						<text>是否开启虚拟成团</text>
						 <switch :checked='data.VirtualGroup' @change="switch1ChangeGroup" color="#FF8B46"/>
					</view>
					<!-- <view class="is-open-group-time" v-if="data.VirtualGroup">
						<view class="is-open-group-hour">
							 <radio-group style="display: block;" @change="radioChange">
								<label style="display: flex;" class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in items" :key="item.value">
									<view>
										<radio color="#FF8B46" :value="item.value" :checked="index === current" />
									</view>
									
									<view class="" style="display: flex;">
										<text>{{item.name}}</text>
										<input type="number" v-model="list.end_group_purchase_hour" v-if="index == 0"/>
										<text>{{item.addName}}</text>
									</view>
								</label>
							</radio-group>
						</view>
					</view> -->
				</view>
				<view class="is-open-group-tip">
					开启虚拟成团后，当用户拼团不成功时，自动成团谨慎操作
				</view>
			</view>
			<!-- <view class="group-defeated">
				<view class="group-defeated-title">
					拼团失败是否退款
				</view>
				<view class="group-defeated-details">
					<view class="group-defeated-content">
						<image :src="imglink + 'member/manage-active_icon_normal2.png'" mode=""></image>
						<view class="">不退款，线下协商退款</view>
						<radio-group @change="radioChangeRefund">
							<label style="display: flex;" class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in refundList" :key="index + '1'">
								<view>
									<radio color="#FF8B46" :value="item.value" :checked="index === currentRefund" />
								</view>
								<view>{{item.name}}</view>
							</label>
						</radio-group>
					</view>
					<view class="group-defeated-content">
						<image :src="imglink + 'member/manage-active_icon_normal1.png'" mode=""></image>
						<view class="">系统自动退款给用户</view>
					</view>
				</view>
			</view> -->
			<!-- <view class="header-welfare">
				<view class="header-welfare-title">
					<text>团长福利</text>
					<switch :checked='data.isWelfare' @change="switch1ChangeWelfare" color="#FF8B46"/>
				</view>
				<view class="header-welfare-input"  v-if="data.isWelfare">
					<textarea v-model="list.head_welfare_content" placeholder="请输入团长福利内容" />
				</view>
			</view> -->
			<!-- <view class="is-show-other-group">
				<view class="is-show-other-group-title">
					<text>报名页面是否显示“参与他人的团”</text>
					<switch :checked='data.showOther' @change="switch1ChangeShow" color="#FF8B46"/>
				</view>
				<view class="is-show-other-group-tip">
					开启后，在拼团报名页面，可以用户可以直接点“参与他人团”,享受成团价；不开启，用户只能通过参团链接，来参与拼团。
				</view>
			</view> -->
		</view>
		<!-- 参与活动课程 -->
		<view class="join-act-course">
			<view class="course_type-title" id="courseTitle">
				<view class="">
					参与活动课程
				</view>
			</view>
			<view id="actCourse" class="join-act-course-details" v-if="list.course_msg.length > 0" v-for="(item,index) in list.course_msg" :key='index'>
				<image :src="imglink + 'member/manage-active_icon_delete.png'" mode="" style="left: -20upx;" @click="delAct(index)"></image>
				<image :src="imglink + 'member/rank.png'" @click="rankCourse(index,item)" mode="" style="right: -20upx;"></image>
				<view class="explain-title">
					<view class=""></view>
					<view class="">
						课程{{index+1}}
					</view>
				</view>
				<view class="join-course-title">
					<!-- <view class="join-course-title-img" @click="changeImg(item,index)" v-if="item.image != ''">
						<image :src="item.image" mode=""></image>
						<view class="masking"></view>
						<view class="change-photo">更换照片</view>
					</view> -->
					<!-- <view class="no-img" v-else @click="upImg(item,index)">
						<image class="" :src="imglink + 'member/manage_icon_camera.png'" mode=""></image>
						<view class="">
							+上传图片
						</view>
					</view> -->
					<view class="join-course-title-input">
						<textarea v-model="item.name" placeholder="请输入课程标题" maxlength="30" @input="courseTitle($event,item,index)"/>
						<view class="">{{item.actTitleNum}}/30</view>
					</view>
				</view>
				<view class="commodity-original-price">
					<view class="">
						商品原价(元)
					</view>
					<input type="digit" v-model="item.origin_price" placeholder="请输入商品原价"/>
				</view>
				<view class="alone-buy-discounts" v-if="page_type == 'discounts'" >
					<view class="">
						单独购买优惠价(元)
					</view>
					<input type="digit" v-model="item.special_price" placeholder="请输入商品优惠价"/>
				</view>
				<view class="join-group-price" v-if="page_type == 'group'">
					<view class="join-group-price-content">
						<view >
							参团价格(元)
						</view>
						<input type="digit" v-model="item.group_purchase_price" placeholder="请输入商品参团价"/>
					</view>
				</view>
				<view class="join-group-price-tip">
					不能低于1元，有人报名后不可修改
				</view>
				<view class="restricted-purchase">
					<view class="restricted-purchase-content">
						<view class="restricted-purchase-content-open">
							<text>每人限购课程数量</text>
							<switch :checked='item.isOpenNum' @change="switch1ChangeCourseNum($event,item)" color="#FF8B46"/>
						</view>
						<view class="restricted-purchase-content-num">
							<image :src="imglink + 'home/reduce_black.png'" mode="" @click="reduceCourseNum('4',item)"></image>
							<view class="">{{item.limit_course}}</view>
							<image :src="imglink + 'home/add-colours.png'" mode="" @click="addCourseNum('4',item)"></image>
						</view>
					</view>
					<view class="restricted-purchase-tip">
						开启限购数量，每个人不可超过限购数量
					</view>
				</view>
				<!-- <view class="give-shopping-card">
					<view class="give-shopping-card-content">
						<text>给家长赠送现金购物卡</text>
						<switch :checked='item.isGive' @change="switch1ChangeGive($event,item,index)" color="#FF8B46"/>
					</view>
					<view class="give-shopping-card-tip">
						开启限购数量，每个人不可超过限购数量
					</view>
				</view> -->
				<!-- <view class="give-shopping-card-money">
					<view class="">
						赠送购物卡面值金额
					</view>
					<input type="number" :disabled="!item.isGive" v-model="item.cash_shopping_card_amount" placeholder="最少100，需要100整倍数" @blur="shoppingCardPrice($event,item,index)"/>
				</view> -->
				<!-- <view class="give-shopping-card-details">
					<view class="">
						扣除购物卡渠道成本价：<text>¥{{item.cardCostPrice || 0}}.00</text>
					</view>
					<view class="">
						说明：家长下单购买后才会赠送购物卡，最低100元，需要是100的整数倍。根据购物卡面值，自动计算购物的渠道成本价，从家长报名费中扣除；购物激活后，不可线上退款；赠送购物卡成本价不能超过课程最低价格；赠送的课程，不送现金购物卡；
					</view>
				</view> -->
				<view class="act-address">
					<view class="act-address-title" style="width: 23%;">
						活动门店
					</view>
					<view class="act-address-choose" @click="chooseShop(index,item)">
						<text>请选择参与门店</text>
						<image :src="imglink + 'home/arrow-right.png'" mode=""></image>
					</view>
				</view>
				<view class="shop-name">
					<view class="" v-for="(name,num) in item.shopName" :key='num'>
						<view class="">{{name}}</view>
						<image :src="imglink + 'member/management_icon_textdelete.png'" mode="" @click="delShop(num,item)"></image>
					</view>
				</view>
				<view class="subject-details">
					<view class="subject-details-title" @click="showDetail(item,index)">
						<text>课程详情</text>
						<text></text>
						<!-- <image :src="imglink + 'member/check-details.png'" mode=""></image> -->
					</view>
					<view class="text-img-content" v-if="true">
						<view class="text-img-details" >
							<view class="" v-for="(src,i) in item.activity_course_description" :key='i'>
								<view class="img-details" v-if="item.activity_course_description.length > 0 && ( src.type == 'photo' || src.image!=null)">
									<image class="img-content" :src="src.value || src.image" mode="widthFix"></image>
									<view class="masking"></view>
									<image class="delete-img" :src="imglink + 'member/manage-active_icon_delete.png'" mode="" @click="delCourseImg(i,item.activity_course_description)"></image>
									<image class="rank-img" :src="imglink + 'member/rank.png'" mode="" @click="rankcourseDetail(i,src,item)"></image>
									<view class="change-img" @click="changeDetailImg(src,index,i)">
										更换图片
									</view>
								</view>
								<view class="text-details" v-if="item.activity_course_description.length > 0 && (src.type == 'text' || src.text!= null)">
									<textarea :value="src.value || src.text" placeholder="请输入文字介绍" @input="gainValue($event,src)"/>
									<image class="delete-img" @click="delText(i,item.activity_course_description)" :src="imglink + 'member/manage-active_icon_delete.png'" mode=""></image>
									<image class="rank-img" :src="imglink + 'member/rank.png'" mode="" @click="rankcourseDetail(i,src,item)"></image>
								</view>
							</view>
							<view class="add-img-text">
								<view class="add-details" @click="addImg(item,index)">
									<image :src="imglink + 'member/add-img.png'" mode=""></image>
									<text>添加图片</text>
								</view>
								<view class="add-details" @click="addText(item,index)">
									<image :src="imglink + 'member/add-text.png'" mode=""></image>
									<text>添加文字</text>
								</view>
							</view>
						</view>
						<!-- <view class="pack-up-details" @click="packUpDetail(item,index)">
							<text>收起详情</text>
							<image :src="imglink + 'member/member-right-two.png'" mode=""></image>
						</view> -->
					</view>
				</view>
			</view>
			<view class="add-course" @click="addCourse">
				+添加新课程
			</view>
		</view>
		<!-- 报名信息收集表单 -->
		<view class="apply-msg">
			<view class="explain-title">
				<view class=""></view>
				<view class="">
					报名信息收集表单
				</view>
			</view>
			<view class="apply-msg-contain">
				<view class="apply-msg-all">
					收集信息
				</view>
				<view v-if="list.actFormMsg" class="apply-msg-content">
					<text v-for="(content,k) in list.actFormMsg" :key='k' >*{{content.name}}</text>
					<!-- <text>*联系电话</text>
					<text>*性别</text>
					<text>*年龄</text> -->
				</view>
				<!-- <view>{{editAct.participants}}</view> -->
				<add-form @getActForm='getActForm($event)' :store_id='store_id' :token="token" :clickFlag="editAct.participants > 0 ? 0:1" :page_operate="page_operate"></add-form>
			</view>
			<view class="add-form-click">
<!-- 				<view v-if="!editAct.participants" class="add-course" @click="addForm">
					编辑添加新表单
				</view>
				<view v-else="!editAct.participants" class="add-course" style="background:#8C939D ;">
					编辑添加新表单
				</view> -->
				<view v-if="editAct.participants>0" class="add-form-tip">
					已经有家长下单，不能再做修改
				</view>
				<view v-else class="add-form-tip2">
					点击按钮，可以添加新的信息收集字段
				</view>
				<!-- 信息收集组件 -->
				<!-- <add-form :store_id="store_id" :token="token"></add-form> -->
			</view>
		</view>
		<!-- 活动详情页 -->
		<!-- <view class="act-detail" style="margin-bottom: 120upx;">
			<view class="explain-title">
				<view class=""></view>
				<view class="">
					活动详情页
				</view>
			</view>
			<view class="act-detail-contain" v-if="list.activity_description.length!=0">
				<view class="" v-for="(item,index) in list.activity_description" :key='index'  >
					<view class="img-details" style="margin-bottom: 30upx;" v-if="item.type == 'photo' || item.description_type == '1'">
						<image class="img-content" :src="item.value" mode="widthFix"></image>
						<view class="masking"></view>
						<image class="delete-img" @click="delActImg(index)" :src="imglink + 'member/manage-active_icon_delete.png'" mode=""></image>
						<image class="rank-img" :src="imglink + 'member/rank.png'" mode="" @click="rankActDetail(item,index)"></image>
						<view class="change-img" @click="changeActImg(item,index)">
							更换图片
						</view>
					</view>
					<view class="text-details" style="margin-bottom: 30upx;" v-if="item.type == 'text' || item.description_type == '0'">
						<textarea :value="item.value" placeholder="请输入文字介绍" @input="gainValue($event,item)"/>
						<image class="delete-img" @click="delActText(index)" :src="imglink + 'member/manage-active_icon_delete.png'" mode=""></image>
						<image class="rank-img" @click="rankActDetail(item,index)" :src="imglink + 'member/rank.png'" mode=""></image>
					</view>
				</view>
			</view>
			<view class="add-img-text" style="margin-top: 38upx;">
				<view class="add-details" @click="addImage">
					<image :src="imglink + 'member/add-img.png'" mode=""></image>
					<text>添加图片</text>
				</view>
				<view class="add-details" @click="addActText">
					<image :src="imglink + 'member/add-text.png'" mode=""></image>
					<text>添加文字</text>
				</view>
			</view>
		</view> -->
		<!-- 预览暂存或者立刻发布活动 -->
		<view class="act-status">
			<!-- <view class="act-common" @click="previewAct">预览活动</view> -->
			<view class="act-common" @click="publishAct('0')">暂存活动</view>
			<view class="act-common publish" @click="publishAct('1')">立刻发布</view>
		</view>
		<!-- 发布成功弹框 -->
		<uni-popup ref="actPublish" :custom="true">
			<view class="popup_box_de">
				<view class="popup_box_succed-img">
					<image :src="imglink + 'member/pop_icon_success2.png'" mode=""></image>
				</view>
				<view class="popup_box-title-succed">
					恭喜你，活动发布成功！
				</view>
				<view class="popup_box-invite" @click="share">
					立即邀请本活动参与员工
				</view>
				 <!-- @click="inviteStaff" -->
			</view>
		</uni-popup>
		<!-- 活动暂存 -->
		<uni-popup ref="actStorage" :custom="true">
			<view class="popup_box_de" style="padding-top: 32upx;">
				<view class="popup_box_succed-img">
					<image :src="imglink + 'member/pop_icon_warning2.png'" mode=""></image>
				</view>
				<view class="popup_box-title-succed">
					活动已经暂存，请绑收款银行卡
				</view>
				<view class="popup_box-tip">
					请先绑定银行卡，否则将导致活动无法收款
				</view>
				<view class="popup_box-invite" style="margin-top: 38upx;" @click="bindingCard">
					立刻去绑卡
				</view>
				<view @click="bindingCardNo" class="popup_box-invite" style="margin-top: 38upx;background: #F3F3F4;color: #666666;box-shadow: none;">
					暂不绑卡
				</view>
			</view>
		</uni-popup>
	</view>
</template>

<script>
	import uniPopup from '../../../components/uni-popup/uni-popup.vue'
	import {uploadFile} from '@/common/alioss.js'
	import addForm from './form/addForm'
	//#ifdef H5
	import wx from '@/common/wx-js-sdk.js'
	//#endif
	import {formatChatTime,formaAlltTime} from '@/common/util.js'
	export default{
		// onShareAppMessage() {
		// 	return {
		// 		title:this.list.name,
		// 		path:'/pages/'
		// 	}
		// },
		components:{uniPopup,addForm},
		
		data(){
			return {
				subjectId:'',
				isShow:true,
				isBindingCard:'',
				//轮播图开始
				indicatorDots: true,
				autoplay: false,
				interval: 2000,
				duration: 500,
				//轮播图结束
				y:'',
				m:'',
				d:'',
				h:'',
				min:"",
				sec:'',
				page_type:'',
				courseId:'',//添加活动门店课程索引值
				token:this.$store.getters.getToken,
				items:[
					{name:'用户开团后',num:'24',addName:'小时自动成团',value:'0',checked: 'true'},
					{name:'活动结束自动成团',value:'1',checked: 'true'}
				],
				refundList:[
					{name:'不退款，线下协商退款',value:'0',checked: 'true'},
					// {name:'系统自动退款给用户',value:'1'},
				],
				current:0,
				currentRefund:0,
				editAct:{},
				listCourse:
					{
						actTitleNum:0,//不需要
						image:'',//活动课程封面
						name:'',//活动课程名称
						origin_price:'',//商品原价
						special_price:'',//商品单独优惠价
						group_purchase_price:'',//商品参团价
						limit_course:'1',//限购课程数量
						isOpenNum:true,//是否开启课程限购
						give_cash_shopping_card_to_parents:1,//是否给家长赠送现金购物卡0否1是
						isGive:true,//是否给家长赠送购物卡
						cash_shopping_card_amount:'',//赠送购物卡面值
						courseDetails:{
								type:'',
								value:''
						},//不需要
						activity_course_description:[],//活动课程详情介绍  图片与文字数组
						all_salesroom:[],//参与活动课程的门店id
						shopName:[],
						showDetails:false,//是否显示课程详情
						cardCostPrice:0,//购物卡成本价,
						music:1, // 音乐开关 2：关，1：开
					}
				,
				data:{
					titleNum:0,
					addNum:true,//是否自动增加名额
					isLimit:false,//是否开启限购数量
					isGiveCourse:false,//是否开启买课赠课环节
					VirtualGroup:true,//是否开启虚拟成团
					isWelfare:true,//团长福利
					showOther:true,//是否显示参加他人的团
				},
				list:{
					name:'',//活动课程名字
					allowed_total:'',//活动科目总名额  不需要
					image:[],//轮播图图片数组
					startDate:'',//开始时间年月日
					startTime:'',//开始时间时分
					endDate:'',//结束时间年月日
					endTime:'',//结束时间时分
					start_date:'',//活动开始时间年月日时分
					end_date:'',//活动结束时间年月日时分
					enable_auto_add_allowed_total: '1',//是否开启剩余20%自动增加金额
					virtual_total:'',//虚报名额
					enable_allowed_purchase_quantity:'1',//是否开启每人限购科目数量
					allowed_purchase_quantity:'1', //每人允许购买数量
					enable_purchase_course_then_give_course:'0',//是否开启买课程赠送课程
					// purchase_course:'1',	//赠送课程数量
					give_course:'1',	//赠送课程数量
					purchase_course:'1',//购买课程数量
					// detail:'1',//	赠送课程数量
					active_status:0,//未开始
					// operate_status:'',//0暂存,1发布
					status:1,//启用
					date_published:'',//发布时间
					date_added:'',//添加时间
					course_msg:[], //参与活动课程内容
					quanlity_group_purchase:'', //	成团人数
					enable_virtual_group_purchase:'1',//是否开启虚拟成团
					enable_head_welfare:'1',//是否开启团长福利
					head_welfare_content:'', //团长福利介绍
					show_other_group_purchase:'1',//是否在报名页面显示“参与他人的团”
					end_group_purchase_type:'0',//开启虚拟成团后，触发成团条件：0用户开团指定小时后自动成团，1活动结束自动成团
					refund_type:'0',//	退款方式0不退款，1线下协商退款；
					end_group_purchase_hour:0,//多少小时自动成团，0活动自动结束
					actDetails:{
						type:'',
						value:''
					},//不需要
					activity_description:[],//活动详情介绍  图片文字数组
					actFormMsg:[],//表单收集信息
					music:1
				},
				startAllTime:'',//开始时间 毫秒
				endAllTime:'',//结束时间 毫秒
				page_operate:'',
				act_id :'',
				bankMsg:[],
				store_id:0,
				activity_id:'',
				subjects : [
					
				],
				noopt:'https://tool.tuanhaoke.cn/static/image/member/manage-active_icon_normal.png',
				opt:'https://tool.tuanhaoke.cn/static/image/member/manage-active_icon_selected.png',
				imglink: this.$store.state.imgLink,
			}
		},
		onLoad(option) {
			console.log(option,"option")
			this.page_type = option.type
			this.page_operate = option.page

			let store_id = parseInt(option.store_id,10);
			if(!store_id>0){
				store_id = uni.getStorageSync('store_id')
			}else{
				uni.setStorageSync('store_id', store_id)
			}
			this.store_id = store_id
			this.$store.commit('updateStoreId',store_id)
			
			if(option.page == 'add'){
				if(this.page_type == 'discounts'){
					this.list = {
						name:'', //活动课程名字
						allowed_total:'',//活动科目总名额  不需要
						image:[],//轮播图图片数组
						startDate:'',//开始时间年月日
						startTime:'',//开始时间时分
						endDate:'',//结束时间年月日
						endTime:'',//结束时间时分
						start_date:'',//活动开始时间年月日时分
						end_date:'',//活动结束时间年月日时分
						subjects_id:'',
						enable_auto_add_allowed_total: '1',//是否开启剩余20%自动增加金额
						virtual_total:'',//虚报名额
						enable_allowed_purchase_quantity:'1', //是否开启每人限购科目数量
						allowed_purchase_quantity:'1',//每人允许购买数量
						enable_purchase_course_then_give_course:'0',	//是否开启买课程赠送课程
						purchase_course:'1',//购买课程数量
						give_course:'1',//	赠送课程数量
						active_status:0,//未开始
						operate_status:'',//0暂存,1发布
						status:1,//启用
						date_published:'',//发布时间
						date_added:'', //添加时间
						course_msg:[], //参与活动课程内容
						actDetails:{
							type:'',
							value:''
						},//不需要
						activity_description:[],//活动详情介绍  图片文字数组
						actFormMsg:[],//表单收集信息
					}
					
				}
			
			}else if(this.page_operate == 'edit'){
				
				console.log(uni.getStorageSync('editActAdd') == '')
				if(uni.getStorageSync('editActAdd') == ''){
					this.editAct = uni.getStorageSync('editAct')
					this.editAct.actFormMsg = []
					console.log(this.$store.state.actForm,"actForm onLoad")
					if(this.$store.state.actForm){
						console.log(this.$store.state.actForm,"this.$store.state.actForm onLoad")
						this.list.actFormMsg = this.$store.state.actForm
					}else{
						console.log(this.$store.state.actForm,"getFormMsg onLoad")
						this.getFormMsg(this.editAct.activity_id)
					}
				}else{
					this.editAct = uni.getStorageSync('editActAdd')
				}
				console.log(this.editAct,'editAct')
				this.subjectId = this.editAct.subjects_id
				if(this.editAct.group_purchase.length == 0){
					this.page_type = "discounts"
					this.list = {
						name:'', //活动课程名字
						allowed_total:'',//活动科目总名额  不需要
						image:[],//轮播图图片数组
						startDate:'',//开始时间年月日
						startTime:'',//开始时间时分
						endDate:'',//结束时间年月日
						endTime:'',//结束时间时分
						start_date:'',//活动开始时间年月日时分
						end_date:'',//活动结束时间年月日时分
						subjects_id:'',
						enable_auto_add_allowed_total: '1',//是否开启剩余20%自动增加金额
						virtual_total:'',//虚报名额
						enable_allowed_purchase_quantity:'1', //是否开启每人限购科目数量
						allowed_purchase_quantity:'1',//每人允许购买数量
						enable_purchase_course_then_give_course:'0',	//是否开启买课程赠送课程
						purchase_course:'1',//购买课程数量
						give_course:'1',//	赠送课程数量
						active_status:0,//未开始
						operate_status:'',//0暂存,1发布
						status:1,//启用
						date_published:'',//发布时间
						date_added:'', //添加时间
						course_msg:[], //参与活动课程内容
						actDetails:{
							type:'',
							value:''
						},//不需要
						activity_description:[],//活动详情介绍  图片文字数组
						actFormMsg:[],//表单收集信息
					}
				}else{
					this.page_type = "group"
					this.list.quanlity_group_purchase = this.editAct.group_purchase[0].quanlity_group_purchase
					this.list.enable_virtual_group_purchase = this.editAct.group_purchase[0].enable_virtual_group_purchase
					if(this.editAct.group_purchase[0].enable_virtual_group_purchase == '1'){
						this.data.VirtualGroup = true
						this.list.end_group_purchase_type = 1
					}else{
						this.data.VirtualGroup = false
					}
					
					if(this.list.quanlity_group_purchase.end_group_purchase_type == 0){
						this.current = 0
					}else{
						this.current = 1
					}
					
					this.list.refund_type = this.editAct.group_purchase[0].refund_type
					for(let i=0;i<this.refundList.length;i++){
						if(this.editAct.group_purchase[0].refund_type == this.refundList[i].value){
							this.currentRefund = i
						}
					}
					this.list.enable_head_welfare = this.editAct.group_purchase[0].enable_head_welfare
					if(this.editAct.group_purchase[0].enable_head_welfare == 1){
						this.isWelfare = true
						this.list.head_welfare_content = this.editAct.group_purchase[0].head_welfare_content
					}else{
						this.isWelfare = false
					}
					this.list.show_other_group_purchase = this.editAct.group_purchase[0].show_other_group_purchase
					this.list.end_group_purchase_hour = this.editAct.group_purchase[0].end_group_purchase_hour
				}
				console.log(this.page_type,'page_typepage_type')
			}
			this.getAllAubjects()
			console.log(this.list,"857")
		},
		onShow() {
			if(this.page_type == "discounts"){
				// #ifdef H5
					document.title = '优惠活动';
				// #endif
				// #ifdef MP-WEIXIN
					uni.setNavigationBarTitle({
						title: '优惠活动'
					});
				// #endif
				// #ifdef H5
					if (/ip(hone|od|ad)/i.test(navigator.userAgent)) {
						var i = document.createElement('iframe');
						i.src = '/favicon.ico';
						i.style.display = 'none';
						i.onload = function() {
							setTimeout(function(){
								i.remove();
							}, 1)
						}
						document.body.appendChild(i);
					}
				// #endif
				
			}
			if(this.page_operate!='edit'){
				if(this.list.course_msg.length != 0){
					let info = this.list.course_msg[uni.getStorageSync('couseId')]
					info.all_salesroom = this.$store.state.joinActShopID
					info.shopName = this.$store.state.joinActShopName
					this.$set(this.list.course_msg,uni.getStorageSync('couseId'),info)
					console.log(info,"page_operatepage_operatepage_operate")
				}
			}
			let time = new Date()
			this.y = time.getFullYear()
			this.m = time.getMonth()+1
			this.d = time.getDate()
			this.h = time.getHours()
			this.min = time.getMinutes()
			this.sec = time.getSeconds()
			let day = this.d + 1
			if(this.m < 10){
				this.m = '0'+ this.m
			}
			if(this.h < 10){
				this.h = '0'+ this.h
			}
			if(this.min < 10){
				this.min = '0'+ this.min
			}
			if(day < 10){
				day = '0'+ day
			}
			if(this.d < 10){
				this.d = '0'+ this.d
			}
			if(this.sec < 10){
				this.sec = '0'+ this.sec
			}
			this.list.startTime = `${this.h}:${this.min}`
			this.list.endTime = `${this.h}:${this.min}`
			this.list.startDate = `${this.y}-${this.m}-${this.d}`
			this.list.endDate = `${this.y}-${this.m}-${day}`
			console.log(this.list.startTime,'????????????????????????');
			console.log(this.list.endTime,'?????????????????????????');
			console.log(this.list.startDate,'????????????????????????');
			console.log(this.list.endDate,'????????????????????????');
			// this.list.actFormMsg = this.$store.state.actForm
			if(uni.getStorageSync('currentChooseTime')){
				this.list.startTime = uni.getStorageSync('currentChooseTime')
			}
			if(uni.getStorageSync('currentChoosedata')){
				this.list.startDate = uni.getStorageSync('currentChoosedata')
			}
			if(uni.getStorageSync('endChooseTime')){
				this.list.endTime = uni.getStorageSync('endChooseTime')
			}
			if(uni.getStorageSync('endChoosedata')){
				this.list.endDate = uni.getStorageSync('endChoosedata')
			}
			this.list.start_date = `${this.list.startDate} ${this.list.startTime}`
			this.list.end_date = `${this.list.endDate} ${this.list.endTime}`
			this.startAllTime = new Date(this.list.start_date).getTime()
			this.endAllTime = new Date(this.list.end_date).getTime()
			console.log('活动开始时间  毫秒',this.startAllTime)
			console.log('活动结束时间  毫秒',this.endAllTime)
			console.log('活动结束时间',this.list.end_date)
			if(this.page_operate == 'preview'){
				this.list = uni.getStorageSync('previewAct')
			}else if(this.page_operate == 'edit'){
				
				this.act_id = this.editAct.activity_id
				this.list.image = []
				this.editAct.image.forEach(data => {
					this.list.image.push(data.image)
				})
				
				this.list.name = this.editAct.name
				this.data.titleNum =  this.editAct.name.length
				// this.list.allowed_total = new Array(item.name).length
				this.list.start_date = this.editAct.start_date
				this.list.end_date = this.editAct.end_date
				this.list.allowed_total = this.editAct.allowed_total
				if(this.editAct.enable_auto_add_allowed_total == '1'){
					this.data.addNum = true
					this.list.enable_auto_add_allowed_total = '1'
				}else{
					this.data.addNum = false
					this.list.enable_auto_add_allowed_total = '0'
				}
				this.list.virtual_total = this.editAct.virtual_total
				if(this.editAct.enable_allowed_purchase_quantity == '1'){
					this.data.isLimit = true
					this.list.enable_allowed_purchase_quantity = '1'
				}else{
					this.data.isLimit = false
					this.list.enable_allowed_purchase_quantity = '0'
				}
				this.list.allowed_purchase_quantity = this.editAct.allowed_purchase_quantity
				if(this.editAct.enable_purchase_course_then_give_course == '1'){
					// this.data.isGiveCourse  =true
					this.$set(this.data,'isGiveCourse',true)
					this.list.enable_purchase_course_then_give_course = '1'
				}else{
					// this.data.isGiveCourse  =false
					this.$set(this.data,'isGiveCourse',false)
					this.list.enable_purchase_course_then_give_course = '0'
				}
				console.log(this.data)
				this.list.purchase_course = this.editAct.purchase_course
				this.list.give_course = this.editAct.give_course
				this.list.course_msg = this.editAct.course_msg
				this.list.music = this.editAct.music
			
				for(let i=0;i<this.editAct.course_msg.length;i++){
					let info = this.editAct.course_msg[i]
					if(this.editAct.course_msg[i].limit_course == 0){
						info.isOpenNum = false
						this.$set(this.list.course_msg,i,info)
					}else{
						info.isOpenNum = true
						this.$set(this.list.course_msg,i,info)
					}
					console.log(this.list.course_msg[i].isOpenNum)
					let addressArray = JSON.parse(JSON.stringify(this.list.course_msg[i]))
					// this.list.course_msg[i].imageMainCourse = item.course_msg[i].image
					if(this.editAct.course_msg[i].give_cash_shopping_card_to_parents ==1){
						this.list.course_msg[i].cardCostPrice = parseInt(this.editAct.course_msg[i].cash_shopping_card_amount/100)*30
					}
					if(this.editAct.course_msg[i].give_cash_shopping_card_to_parents == 1){
						this.list.course_msg[i].isGive = true
					}else{
						this.list.course_msg[i].isGive = false
						this.list.course_msg[i].cash_shopping_card_amount = ''
					}
					
					this.list.course_msg[i].actTitleNum = this.editAct.course_msg[i].name.length
					this.list.course_msg[i].showDetails = true
					if(uni.getStorageSync('editActAdd') == ''){
						if(addressArray.all_salesroom.length!=0){
							this.list.course_msg[i].all_salesroom= []
							this.list.course_msg[i].shopName = []
							addressArray.all_salesroom.forEach(infoData =>{
								console.log(infoData&&infoData.constructor!= Number,"infoDatainfoDatainfoDatainfoData")
								if(infoData&&infoData.constructor!= Number){
									this.list.course_msg[i].all_salesroom.push(infoData[0].customer_organization_salesroom_id)
									this.list.course_msg[i].shopName.push(infoData[0].name)
								}
							})
						}
						this.list.course_msg[i].activity_course_description = []
						if(addressArray.activity_course_description.length!=0){
							addressArray.activity_course_description.forEach(info => {
								let data = {
									type:'',
									value:''
								}
								if(info.text == null){
									data.type = 'photo'
									data.value = info.image
									this.list.course_msg[i].activity_course_description.push(data)
								}else if(info.image == null){
									data.type = 'text'
									data.value = info.text
									this.list.course_msg[i].activity_course_description.push(data)
								}
							})
						}
					}else{
						if(uni.getStorageSync('couseId') === 0){
							let info = this.list.course_msg[uni.getStorageSync('couseId')]
							info.all_salesroom = this.$store.state.joinActShopID
							info.shopName = this.$store.state.joinActShopName
							this.$set(this.list.course_msg,uni.getStorageSync('couseId'),info)
						}
						if(uni.getStorageSync('couseId')){
							console.log('88888888888888888888')
							let info = this.list.course_msg[uni.getStorageSync('couseId')]
							info.all_salesroom = this.$store.state.joinActShopID
							info.shopName = this.$store.state.joinActShopName
							this.$set(this.list.course_msg,uni.getStorageSync('couseId'),info)
						}
					}
				}
				// this.list.activity_description = item.activity_description
				if(uni.getStorageSync('editActAdd') == ''){
					let descriptionData = JSON.parse(JSON.stringify(this.editAct.activity_description))
					descriptionData.forEach(item => {
						let info = {
							type:'',
							value:""
						}
						if(item.description_type == 1){
							info.type = 'photo'
						}else{
							info.type = 'text'
						}
						info.value = item.value
						this.list.activity_description.push(info)
					})
				}
				let changeTimeEnd = new Date(this.list.end_date.replace(/-/g, '/')).getTime()
				this.list.endDate = formatChatTime(changeTimeEnd)
				this.list.endTime = formaAlltTime(changeTimeEnd)
				let changeTimeStart = new Date(this.list.start_date.replace(/-/g, '/')).getTime()
				this.list.startDate = formatChatTime(changeTimeStart)
				this.list.startTime = formaAlltTime(changeTimeStart)
				
				uni.removeStorageSync('editActAdd')
			}
			if(this.$store.state.actForm){
				console.log(this.list.actFormMsg,'4564464561111111111')
				this.list.actFormMsg = this.$store.state.actForm
				this.editAct.actFormMsg=this.list.actFormMsg 
			}else{
				console.log(this.list.actFormMsg,'45644645622222222')
				this.list.actFormMsg = this.editAct.actFormMsg
				this.$store.state.actForm=this.list.actFormMsg
				console.log(this.list.actFormMsg,'456446456222222221')
			}
			if(!this.editAct.image){
				this.editAct.image=[]
			}
			console.log(this.list,"857")
			// uni.removeStorageSync('specialGroup_data')
		},
		onHide() {
			console.log("onHideonHideonHideonHideonHideonHide");
			uni.setStorageSync('editActAdd',this.editAct)
			// uni.setStorageSync("specialGroup_data",this.$data)
		},
		methods:{
			// 获取培训科目
			getAllAubjects(){
				let data  = {
						token:this.$store.getters.getToken,
						customer_id:1,
						// customer_id:this.$store.getters.getCustomerId,
						store_id:this.$store.getters.getStoreId,
					}
				this.$api.get_allAubjects(data).then(res => {
					console.log(res)
					if(res.status){
						this.subjects = res.data
						console.log(this.subjects,"------------------------------");
						console.log(this.list,"857")
					}else{
						uni.showToast({
							title:res.msg,
							icon:'none',
							duration:2000
						})
					}
				}).catch(err => {
					console.log(err)
				})
			},
			getFormMsg(id){
				let data = {
					token:this.$store.getters.getToken,
					activity_id:id
				}
				let that = this
				this.$api.together_order_msg(data).then(res => {
					console.log(res)
					if(res.status){
						let array = res.res
						let actFormMsg=[]
						array.forEach(item => {
							that.list.actFormMsg = []
							let infoMsg = {
								id:'',
								value:'',
								name:'',
								state:"",
								placeholder:''
							}
							infoMsg.id = item.name.field_id
							infoMsg.name = item.name.name
							infoMsg.state = item.name.required
							infoMsg.placeholder = '请输入' + item.name.name
							infoMsg.value = ''
							actFormMsg.push(infoMsg)
							console.log(infoMsg)
						})
						
						that.list.actFormMsg=actFormMsg
						that.editAct.actFormMsg=actFormMsg
						that.$store.state.actForm=actFormMsg
						// that.list.actFormMsg = res.res
						
					}else{
						uni.showToast({
							title:res.msg,
							icon:'none',
							duration:2000
						})
					}
				}).catch(err => {
					console.log(err)
				})
			},
			rankActDetail(item,index){
				if(index == 0){
					uni.showToast({
						title:'当前位置已是第一个',
						icon:'none',
						duration:2000
					})
					return false
				}
				this.list.activity_description.splice(index,1)
				this.list.activity_description.unshift(item)
			},
			shoppingCardPrice(event,item,index){
				let info = item
				console.log(item,'11111111111111')
				info.cardCostPrice = parseInt(info.cash_shopping_card_amount/100)*30
				this.$set(this.list.course_msg,index,info)
			},
			//收起活动课程详情
			packUpDetail(item,index){
				item.showDetails = false
				if(this.page_operate == 'edit'){
					let data = item
					data.showDetails = false
					this.$set(this.list.course_msg,index,data)
				}
			},
			//返回首页
			backHome(){
				uni.navigateTo({
					url:'../../home/home?store_id=' + this.store_id
				})
			},
			changeActImg(item,index){
				uni.setStorageSync('editActAdd',this.editAct)
				uni.chooseImage({
					sizeType: ['original', 'compressed'],
				    success: (chooseImageRes) => {
						// if (!/\.(gif|jpg|jpeg|png|bmp)$/.test(chooseImageRes.tempFiles[0].name)) {
						// 	uni.showToast({
						// 		title:'图片类型必须为gif/jpg/jpeg/png/bmp',
						// 		icon:'none',
						// 		duration:2000
						// 	})
						// 	return false;
						// }
						uni.getImageInfo({
							src: chooseImageRes.tempFilePaths[0],
							success: (image) => {
								uni.showLoading({
									title: '图片上传中'
								})
								uploadFile(chooseImageRes.tempFilePaths[0]).then(res => {
									console.log(res)
									if(res.status){
										item.value = res.data.url
										if(this.page_operate == 'edit'){
											this.list.activity_description[index].value = res.data.url
										}
										uni.hideLoading()
									}
								}).catch(err => {
									console.log(err)
								})
							}
						})
				    }
				});
			},
			changeDetailImg(item,index,i){
				uni.setStorageSync('editActAdd',this.editAct)
				uni.chooseImage({
					count:1,
					sizeType: ['original', 'compressed'],
				    success: (chooseImageRes) => {
						if (!/\.(jpg|png|bmp)$/.test(chooseImageRes.tempFiles[0].name)) {
							uni.showToast({
								title:'图片类型必须为jpg/png/bmp',
								icon:'none',
								duration:2000
							})
							return false;
						}
						uni.getImageInfo({
							src: chooseImageRes.tempFilePaths[0],
							success: (image) => {
								uni.showLoading({
									title: '图片上传中'
								})
								uploadFile(chooseImageRes.tempFilePaths[0]).then(res => {
									console.log(res)
									if(res.status){
										item.value = res.data.url
										if(this.page_operate == 'edit'){
											this.list.course_msg[index].activity_course_description[i].value = res.data.url
										}
										uni.hideLoading()
									}
								}).catch(err => {
									console.log(err)
								})
							}
						})
				    }
				});
			},
			gainValue(event,item){
				item.value = event.detail.value
			},
			rankcourseDetail(index,src,item){
				console.log(src)
				if(index == 0){
					uni.showToast({
						title:'当前位置已是第一个',
						icon:'none',
						duration:2000
					})
					return false
				}
				item.activity_course_description.splice(index,1)
				item.activity_course_description.unshift(src)
			},
			rankCourse(index,item){
				if(index == 0){
					uni.showToast({
						title:'当前位置已是第一个',
						icon:'none',
						duration:2000
					})
					return false
				}
				this.list.course_msg.splice(index,1)
				this.list.course_msg.unshift(item)
			},
			share(){
				let data = {
					token:this.$store.getters.getToken,
					activity_id:this.activity_id
					// activity_id:85
				}
				this.$api.gain_all_act(data).then(res => {
					console.log(res)
					if(res.status){
						this.$refs.actPublish.close()
						uni.setStorageSync('inviteStaffAct',res.list.data[0])
						uni.navigateTo({
							url:'../formGatherManage/inviteStaffManage/inviteStaffManage?store_id=' + this.store_id + 'page=actManage&use=inviteAct'
						})
					}
				}).catch(err => {
					console.log(err)
				})
				// uni.navigateTo({
				// 	url:'../formGatherManage/inviteStaffManage/inviteStaffManage?store_id=' + this.store_id + 'page=actManage&use=inviteAct'
				// })
			},
			replaceClcik(index){
				uni.chooseImage({
					sizeType: ['original', 'compressed'],
				    success: (chooseImageRes) => {
						// if (!/\.(gif|jpg|jpeg|png|bmp)$/.test(chooseImageRes.tempFiles[0].name)) {
						// 	uni.showToast({
						// 		title:'图片类型必须为gif/jpg/jpeg/png/bmp',
						// 		icon:'none',
						// 		duration:2000
						// 	})
						// 	return false;
						// }
						uni.getImageInfo({
							src: chooseImageRes.tempFilePaths[0],
							success: (img) => {
								uni.showLoading({
									title: '图片上传中'
								})
								uploadFile(chooseImageRes.tempFilePaths[0]).then(res => {
									console.log(res)
									if(res.status){
										this.$set(this.list.image,index,res.data.url)
										this.editAct.image[index]={image:res.data.url}
										// this.list.image[index]= res.data.url
										uni.hideLoading()
									}
								}).catch(err => {
									console.log(err)
								})
							}
						})
				    }
				});
			},
			bindingCardNo(){
				this.$refs.actStorage.close()
				uni.redirectTo({
					url: '../../home/home?store_id=' + this.store_id
				});
			},
			// 预览活动
			previewAct(){
				uni.setStorageSync('previewAct',this.list)
				uni.navigateTo({
					url:'../../home/organization/activeDetails-3?page=preview&actType=' + this.page_type
				})
			},
			bindingCard(){
				this.$refs.actStorage.close()
				uni.navigateTo({
					url:'../shop/BankCardBinding/BankCardBinding?page=bingind'
				})
			},
			BindingCard(){
				let data = {
					token:this.$store.getters.getToken,
					store_id:this.store_id
				}
				this.$api.is_binding_card(data).then(res => {
					console.log(res)
					if(res.status){
						this.isBindingCard = res.res
					}
				}).catch(err => {
					console.log(err)
				})
			},
			// 活动发布或暂存成功
			publishAct(flag){
				console.log(this.listCourse,'LLLLLLLLLLL')
				console.log(flag)
				this.BindingCard()
				if(this.verification()){
					let time = new Date()
					this.list.date_added = `${time.getFullYear()}-${time.getMonth()+1}-${time.getDate()} ${time.getHours()}:${time.getMinutes()}`
					this.list.active_type=this.page_type
					let data
					if(this.page_operate == 'add'){
						 data  = {
							token:this.token,
							// customer_id:uni.getStorageSync('customer_id'),
							store_id:this.$store.getters.getStoreId,
							arrar:JSON.stringify(this.list),
							active_type:this.page_type,
							operate_status:flag
						}
					}else{
						data ={
							activity_id:this.act_id,
							token:this.$store.getters.getToken,
							// customer_id:uni.getStorageSync('customer_id'),
							store_id:this.$store.getters.getStoreId,
							arrar:JSON.stringify(this.list),
							active_type:this.page_type,
							operate_status:flag
						}
					}
					console.log(this.list.music,"++++++++++++++++++++++++++++++++++++++++++++++");
					console.log(data,"88888888888888888888888888888888888888888888888888888888888");
					if(this.page_operate == 'add'){
						this.$api.add_group_act(data).then(res => {
							console.log(res)
							if(res.status){
								this.activity_id = res.activity_id 
								uni.removeStorageSync('couseId')
								uni.removeStorageSync('currentChooseTime')
								uni.removeStorageSync('currentChoosedata')
								uni.removeStorageSync('endChooseTime')
								uni.removeStorageSync('endChoosedata')
								if(flag == '1'){
									this.$refs.actPublish.open()
									// if(this.isBindingCard!=''){
									// 	this.$refs.actPublish.open()
									// }else{
									// 	this.$refs.actStorage.open()
									// }
								}else{
									uni.showToast({
										title:'活动暂存成功',
										icon:'none',
										duration:2000
									})
									this.$store.state.actForm=null
									setTimeout(() => {
										uni.navigateTo({
											url:"/pages/memberCenter/activityManage/activityManage?topNavActiveIndex=0&store_id="+this.store_id
										})
									},1000)
								}
							}else{
								uni.showToast({
									title:res.msg,
									icon:'none',
									duration:2000
								})
							}
						}).catch(err => {
							console.log(err)
						})
					}else if(this.page_operate == 'edit'){
						// console.log(data,"4444444444444444444444444444444444444444444444444444444");
						
						this.$api.edit_group_act(data).then(res => {
							// console.log(data,"4444444444444444444444444444444444444444444444444444444");
							console.log(res)
							if(res.status){
								uni.removeStorageSync('editAct')
								uni.removeStorageSync('editActAdd')
								uni.showToast({
									title:'修改成功',
									icon:'none',
									duration:2000
								})
								
								this.$store.state.actForm=null
								setTimeout(() => {
									uni.navigateTo({
										url:"/pages/memberCenter/activityManage/activityManage?topNavActiveIndex=0&store_id="+this.store_id
									})
								},1000)
							}
						}).catch(err => {
							console.log(err)
						})
					}
				}
			},
			// 验证信息
			verification(){
				let flag = true
				let regEn = /[`~!@#$%^&*()_+<>?:"{},.\/;'[\]]/im,
					regCn = /[·！#￥（——）：；“”‘、，|《。》？、【】[\]]/im;
					if(this.list.image.length < 1){
						uni.showToast({
							title:'活动封面轮播图至少需一张',
							icon:'none',
							duration:2000
						})
						return flag = false
					}
					if(this.list.name == ''){
						uni.showToast({
							title:'活动名称不得为空',
							icon:'none',
							duration:2000
						})
						return flag = false
					}
					if( this.endAllTime < this.startAllTime || this.endAllTime == this.startAllTime){
						uni.showToast({
							title:'活动结束时间不得小于开始时间',
							icon:'none',
							duration:2000
						})
						return flag = false
					}
					// if(this.list.enable_allowed_purchase_quantity == 1 && this.list.enable_purchase_course_then_give_course == 1){
					// 	if(parseInt(this.list.allowed_purchase_quantity) < (parseInt(this.list.purchase_course) + parseInt(this.list.give_course))){
					// 		uni.showToast({
					// 			title:'允许购买数量需大于或等于买赠数量',
					// 			icon:'none',
					// 			duration:2000
					// 		})
					// 		return flag = false
					// 	}
					// }
					console.log(this.list.actFormMsg,'MMMMMMMMMMMMMMMMMMMMMM');
					if(this.list.course_msg.length!=0){
						
						this.list.course_msg.forEach(item => {
							// if(item.give_cash_shopping_card_to_parents == 1){
							// 	if(item.cash_shopping_card_amount%100 != 0 || item.cash_shopping_card_amount == ''){
							// 		uni.showToast({
							// 			title:'赠送购物卡数额必须是100的倍数',
							// 			icon:'none',
							// 			duration:2000
							// 		})
							// 		return flag = false
							// 	}
							// 	if(this.page_type == 'group'){
							// 		if(parseFloat(item.group_purchase_price) < parseFloat(item.cardCostPrice)){
							// 			uni.showToast({
							// 				title:'当前拼团价必须大于赠送购物卡成本费',
							// 				icon:'none',
							// 				duration:2000
							// 			})
							// 			return flag = false
							// 		}
							// 	}else{
							// 		if(parseFloat(item.special_price) < parseFloat(item.cardCostPrice)){
							// 			uni.showToast({
							// 				title:'当前优惠价必须大于赠送购物卡成本费',
							// 				icon:'none',
							// 				duration:2000
							// 			})
							// 			return flag = false
							// 		}
							// 	}
							// }
							// if(item.all_salesroom.length<1){
							// 	uni.showToast({
							// 		title:'至少选择一家门店参与活动课程',
							// 		icon:'none',
							// 		duration:2000
							// 	})
							// 	return flag = false
							// }
							// if(parseFloat(item.origin_price) < parseFloat(item.special_price)){
							// 	uni.showToast({
							// 		title:'课程原价需大于优惠价',
							// 		icon:'none',
							// 		duration:2000
							// 	})
							// 	return flag = false
							// }
							if(this.page_type == 'group'){
								item.special_price = item.group_purchase_price
								// if(parseFloat(item.special_price) < parseFloat(item.group_purchase_price)){
								// 	uni.showToast({
								// 		title:'课程优惠价需大于拼团价',
								// 		icon:'none',
								// 		duration:2000
								// 	})
								// 	return flag = false
								// }
								if(item.group_purchase_price == ''){
									uni.showToast({
										title:'请输入活动课程价格',
										icon:'none',
										duration:2000
									})
									return flag = false
								}
								
								if(item.origin_price <= 0 || item.group_purchase_price <= 0){
									uni.showToast({
										title:'参团价格必须大于0',
										icon:'none',
										duration:2000
									})
									return flag = false
								}
							}
							if(item.origin_price == ''){
								uni.showToast({
									title:'请输入活动课程价格',
									icon:'none',
									duration:2000
								})
								return flag = false
							}
							
							if(this.page_type == 'discounts'){
								if(item.origin_price <= 0 || item.special_price <= 0){
									uni.showToast({
										title:'商品价格必须大于0',
										icon:'none',
										duration:2000
									})
									return flag = false
								}
							}
							
						})
					}
					if(this.page_type == 'group'){
						if(this.list.quanlity_group_purchase < 2){
							uni.showToast({
								title:'成团人数必须是2人以上',
								icon:'none',
								duration:2000
							})
							return flag = false
						}
					}
					if(parseInt(this.list.virtual_total) >= parseInt( this.list.allowed_total)){
						uni.showToast({
							title:'虚拟数量需小于实际总人数',
							icon:'none',
							duration:2000
						})
						return flag = false
					}
					if(this.list.course_msg.length == 0){
						uni.showToast({
							title:'活动课程必须有一个',
							icon:'none',
							duration:2000
						})
						return flag = false
					}
					if(this.list.actFormMsg == undefined){
						uni.showToast({
							title:'请选择需要收集的信息',
							icon:'none',
							duration:2000
						})
						return flag = false
					}
					return flag
					
			},
			// 取消参与活动的门店
			delShop(index,item){
				
				let info = item
				
				info.shopName.splice(index,1)
				item.all_salesroom.splice(index,1)
				this.$set(this.list.course_msg,index,info)
				console.log(item.all_salesroom,'参与活动门店id')
			},
			// 选择参与活动门店
			chooseShop(index,item){
				this.courseId = index
				uni.setStorageSync('couseId',index)
				uni.setStorageSync('currentChooseTime',this.list.startTime)
				uni.setStorageSync('currentChoosedata',this.list.startDate)
				uni.setStorageSync('endChooseTime',this.list.endTime)
				uni.setStorageSync('endChoosedata',this.list.endDate)
				if(this.page_operate == 'edit'){
					uni.setStorageSync('editActAddreId',item.all_salesroom)
					uni.setStorageSync('editActAddreName',item.shopName)
					uni.setStorageSync('editActAdd',this.editAct)
					uni.navigateTo({
						url:'../addressManage/addressManage?page=activity&actAddre=actEdit&store_id=' + this.store_id
					})
				}else{
					if(item.all_salesroom.length!=0){
						uni.setStorageSync('addAddreId',item.all_salesroom)
						uni.setStorageSync('addAddreName',item.shopName)
					}
					console.log(item.all_salesroom.length,'24356456')
					uni.navigateTo({
						url:'../addressManage/addressManage?page=activity&actAddre=actAdd&store_id=' + this.store_id
					})
				}
			},
			// 删除参与活动的课程
			delAct(index){
				this.list.course_msg.splice(index,1)
			},
			// 删除活动课程的图片介绍
			delActImg(index){
				this.list.activity_description.splice(index,1)
			},
			// 删除活动课程的文字介绍
			delActText(index){
				this.list.activity_description.splice(index,1)
			},
			// 添加活动详情图片介绍
			addImage(){
				uni.setStorageSync('editActAdd',this.editAct)
				this.list.actDetails = {
						type:'',
						value:''
					}
				uni.chooseImage({
					sizeType: ['original', 'compressed'],
				    success: (chooseImageRes) => {
						// if (!/\.(gif|jpg|jpeg|png|bmp)$/.test(chooseImageRes.tempFiles[0].name)) {
						// 	uni.showToast({
						// 		title:'图片类型必须为gif/jpg/jpeg/png/bmp',
						// 		icon:'none',
						// 		duration:2000
						// 	})
						// 	return false;
						// }
						uni.getImageInfo({
							src: chooseImageRes.tempFilePaths[0],
							success: (image) => {
								uni.showLoading({
									title: '图片上传中'
								})
								uploadFile(chooseImageRes.tempFilePaths[0]).then(res => {
									console.log(res)
									if(res.status){
										this.list.actDetails.value = res.data.url
										this.list.actDetails.type = 'photo'										
										this.list.activity_description.push(this.list.actDetails)
										uni.hideLoading()
									}
								}).catch(err => {
									console.log(err)
								})
							}
						})
				    }
				});
			},
			// 添加活动详情文字介绍
			addActText(){
				this.list.actDetails = {
						type:'',
						value:''
					}
				this.list.actDetails.type = 'text'
				this.list.activity_description.push(this.list.actDetails)
				console.log(this.list.activity_description)
			},
			// 添加活动课程的文字介绍
			addText(item,i){
				item.courseDetails = {
						type:'',
						value:''
					}
				item.courseDetails.type = 'text'
				item.activity_course_description.push(item.courseDetails)
				
			},
			// 添加活动课程的图片介绍
			addImg(item,i){
				uni.setStorageSync('editActAdd',this.editAct)
				item.courseDetails ={
						type:'',
						value:''
					}
				uni.chooseImage({
					sizeType: ['original', 'compressed'],
				    success: (chooseImageRes) => {
						// if (!/\.(gif|jpg|jpeg|png|bmp)$/.test(chooseImageRes.tempFiles[0].name)) {
						// 	uni.showToast({
						// 		title:'图片类型必须为gif/jpg/jpeg/png/bmp',
						// 		icon:'none',
						// 		duration:2000
						// 	})
						// 	return false;
						// }
						uni.getImageInfo({
							src: chooseImageRes.tempFilePaths[0],
							success: (image) => {
								uni.showLoading({
									title: '图片上传中'
								})
								uploadFile(chooseImageRes.tempFilePaths[0]).then(res => {
									console.log(res)
									if(res.status){
										item.courseDetails.value = res.data.url
										item.courseDetails.type = 'photo'
										if(this.page_operate == 'edit'){
											this.list.course_msg[i].courseDetails.value = res.data.url
											this.list.course_msg[i].courseDetails.type = 'photo'
											this.list.course_msg[i].activity_course_description.push(item.courseDetails)
										}else{
											item.activity_course_description.push(item.courseDetails)
										}
										uni.hideLoading()
									}
								}).catch(err => {
									console.log(err)
								})
							}
						})
				    }
				});
			},
			// 删除活动课程指定图片介绍
			delCourseImg(i,item){
				item.splice(i,1)
			},
			// 删除活动课程指定文字介绍
			delText(i,item){
				item.splice(i,1)
			},
			// 是否显示活动课程的课程详情
			showDetail(item,index){
				
				// this.isShow=!this.isShow;
				
				if(this.page_operate == 'edit'){
					let data = item
					data.showDetails = !data.showDetails
					this.$set(this.list.course_msg,index,data)
				}else{
					item.showDetails = !item.showDetails
				}
			},
			// 是否开启虚拟成团
			radioChange: function(evt) {
				for (let i = 0; i < this.items.length; i++) {
					if (this.items[i].value === evt.target.value) {
						this.current = i;
						this.list.end_group_purchase_type = this.items[i].value
						console.log(this.list.end_group_purchase_type)
						break;
					}
				}
			},
			// 拼团失败的退款方式
			radioChangeRefund: function(evt) {
				for (let i = 0; i < this.refundList.length; i++) {
					if (this.refundList[i].value === evt.target.value) {
						this.currentRefund = i;
						this.list.refund_type = this.refundList[i].value
						break;
					}
				}
			},
			// 添加参与活动的课程
			addCourse(){
				this.listCourse = {
					actTitleNum:0,
					image:'',//活动课程封面
					name:'',//活动课程名称
					origin_price:'',//商品原价
					special_price:'',//商品单独优惠价
					group_purchase_price:'',//商品参团价
					limit_course:'1',//限购课程数量
					isOpenNum:true,//是否开启课程限购
					give_cash_shopping_card_to_parents:1,//是否给家长赠送现金购物卡0否1是
					isGive:true,//是否给家长赠送购物卡
					cash_shopping_card_amount:'',//赠送购物卡面值
					courseDetails:{
							type:'',
							value:''
					},
					activity_course_description:[],
					all_salesroom:[],//参与活动课程的门店id
					shopName:[],
					showDetails:false,
					music:1, // 音乐开关 2：关，1：开
				}
				this.list.course_msg.push(this.listCourse)
				console.log(this.list.course_msg)
			},
			// 更换活动课程封面
			changeImg(item,index){
				uni.setStorageSync('editActAdd',this.editAct)
				uni.chooseImage({
					sizeType: ['original', 'compressed'],
				    success: (chooseImageRes) => {
						// if (!/\.(gif|jpg|jpeg|png|bmp)$/.test(chooseImageRes.tempFiles[0].name)) {
						// 	uni.showToast({
						// 		title:'图片类型必须为gif/jpg/jpeg/png/bmp',
						// 		icon:'none',
						// 		duration:2000
						// 	})
						// 	return false;
						// }
						uni.getImageInfo({
							src: chooseImageRes.tempFilePaths[0],
							success: (image) => {
								uni.showLoading({
									title: '图片上传中'
								})
								uploadFile(chooseImageRes.tempFilePaths[0]).then(res => {
									console.log(res)
									if(res.status){
										item.image = res.data.url
										if(this.page_operate == 'edit'){
											this.list.course_msg[index].image = res.data.url
										}
										console.log(item.image ,'更换活动课程封面')
										uni.hideLoading()
									}
								}).catch(err => {
									console.log(err)
								})
							}
						})
				    }
				});
			},
			// 上传活动课程封面
			upImg(item,index){
				uni.setStorageSync('editActAdd',this.editAct)
				// uni.setStorageSync('editActcourse',index)
				console.log(item)
				uni.chooseImage({
					sizeType: ['original', 'compressed'],
				    success: (chooseImageRes) => {
						if (!/\.(gif|jpg|jpeg|png|bmp)$/.test(chooseImageRes.tempFiles[0].name)) {
							uni.showToast({
								title:'图片类型必须为gif|jpg|jpeg|png|bmp',
								icon:'none',
								duration:2000
							})
							return false;
						}
						uni.getImageInfo({
							src: chooseImageRes.tempFilePaths[0],
							success: (image) => {
								uni.showLoading({
									title: '图片上传中'
								})
								uploadFile(chooseImageRes.tempFilePaths[0]).then(res => {
									console.log(res)
									if(res.status){
										item.image = res.data.url
										if(this.page_operate == 'edit'){
											this.list.course_msg[index].image = res.data.url
										}
										console.log(item.image ,'更换活动课程封面')
										uni.hideLoading()
									}
								}).catch(err => {
									console.log(err)
								})
							}
						})
				    }
				});
			},
			// 添加轮播图图片上传
			upLoadImg(index){
				if(index == '0'){
					uni.chooseImage({
						sizeType: ['original', 'compressed'],
					    success: (chooseImageRes) => {
							console.log(chooseImageRes,'CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC');
							// if (!/\.(gif|jpg|jpeg|png|bmp)$/.test(chooseImageRes.tempFiles[0].name)) {
							// 	uni.showToast({
							// 		title:'图片类型必须为gif/jpg/jpeg/png/bmp',
							// 		icon:'none',
							// 		duration:2000
							// 	})
							// 	return false;
							// }
							uni.getImageInfo({
								src: chooseImageRes.tempFilePaths[0],
								success: (image) => {
									uni.showLoading({
										title: '图片上传中'
									})
									uploadFile(chooseImageRes.tempFilePaths[0]).then(res => {
										console.log(res)
										if(res.status){
											this.list.image.push(res.data.url)
											this.editAct.image.push({image:res.data.url})
											console.log(this.list.image,'上传轮播图图片')
											uni.hideLoading()
										}
									}).catch(err => {
										console.log(err)
									})
								}
							})
					    }
					});
				}else if(index == '1'){
					uni.chooseImage({
						sizeType: ['original', 'compressed'],
					    success: (chooseImageRes) => {
							// if (!/\.(gif|jpg|jpeg|png|bmp)$/.test(chooseImageRes.tempFiles[0].name)) {
							// 	uni.showToast({
							// 		title:'图片类型必须为gif/jpg/jpeg/png/bmp',
							// 		icon:'none',
							// 		duration:2000
							// 	})
							// 	return false;
							// }
							uni.getImageInfo({
								src: chooseImageRes.tempFilePaths[0],
								success: (image) => {
									uni.showLoading({
										title: '图片上传中'
									})
									uploadFile(chooseImageRes.tempFilePaths[0]).then(res => {
										console.log(res)
										if(res.status){
											this.list.image.push(res.data.url)
											this.editAct.image.push({image:res.data.url})
											console.log(this.list.image,'上传轮播图图片')
											uni.hideLoading()
										}
									}).catch(err => {
										console.log(err)
									})
								}
							})
					    }
					});
				}else if(index == '2'){
					uni.chooseImage({
						sizeType: ['original', 'compressed'],
					    success: (chooseImageRes) => {
							// if (!/\.(gif|jpg|jpeg|png|bmp)$/.test(chooseImageRes.tempFiles[0].name)) {
							// 	uni.showToast({
							// 		title:'图片类型必须为gif/jpg/jpeg/png/bmp',
							// 		icon:'none',
							// 		duration:2000
							// 	})
							// 	return false;
							// }
							uni.getImageInfo({
								src: chooseImageRes.tempFilePaths[0],
								success: (image) => {
									uni.showLoading({
										title: '图片上传中'
									})
									uploadFile(chooseImageRes.tempFilePaths[0]).then(res => {
										console.log(res)
										if(res.status){
											this.list.image.push(res.data.url)
											this.editAct.image.push({image:res.data.url})
											console.log(this.list.image,'上传轮播图图片')
											uni.hideLoading()
										}
									}).catch(err => {
										console.log(err)
									})
								}
							})
					    }
					});
				}else if(index == '3'){
					uni.chooseImage({
						sizeType: ['original', 'compressed'],
					    success: (chooseImageRes) => {
							// if (!/\.(gif|jpg|jpeg|png|bmp)$/.test(chooseImageRes.tempFiles[0].name)) {
							// 	uni.showToast({
							// 		title:'图片类型必须为gif/jpg/jpeg/png/bmp',
							// 		icon:'none',
							// 		duration:2000
							// 	})
							// 	return false;
							// }
							uni.getImageInfo({
								src: chooseImageRes.tempFilePaths[0],
								success: (image) => {
									uni.showLoading({
										title: '图片上传中'
									})
									uploadFile(chooseImageRes.tempFilePaths[0]).then(res => {
										console.log(res)
										if(res.status){
											this.list.image.push(res.data.url)
											this.editAct.image.push({image:res.data.url})
											console.log(this.list.image,'上传轮播图图片')
											uni.hideLoading()
										}
									}).catch(err => {
										console.log(err)
									})
								}
							})
					    }
					});
				}
			},
			actTitleInput(e){
				console.log(e)
				this.data.titleNum = e.detail.cursor
				
			},
			// 活动开始时间
			dateStartChange(e){
				let str = e.target.value.toString()
				this.list.startDate = str
				this.list.start_date = `${this.list.startDate} ${this.list.startTime}`
				this.startAllTime = new Date(this.list.start_date).getTime()
				console.log('活动开始时间  毫秒',this.startAllTime)
				console.log("startTime----------",this.list.start_date)
				console.log("startDate",this.list.startDate)
			},
			timeStartChange(e){
				let str = e.target.value.toString()
				this.list.startTime = str
				this.list.start_date = `${this.list.startDate} ${this.list.startTime}`
				this.startAllTime = new Date(this.list.start_date).getTime()
				console.log('活动开始时间  毫秒',this.startAllTime)
				console.log("startTime----------",this.list.start_date)
			},
			// 活动结束时间
			dateEndChange(e){
				let str = e.target.value.toString()
				this.list.endDate = str
				this.list.end_date = `${this.list.endDate} ${this.list.endTime}`
				this.endAllTime = new Date(this.list.end_date).getTime()
				console.log('活动开始结束  毫秒',this.endAllTime)
				console.log("end_date",this.list.end_date)
				console.log("list",this.list)
			},
			timeEndChange(e){
				let str = e.target.value.toString()
				this.list.endTime = str
				this.list.end_date = `${this.list.endDate} ${this.list.endTime}`
				this.endAllTime = new Date(this.list.end_date).getTime()
				console.log('活动开始结束  毫秒',this.endAllTime)
				console.log("endTime",this.list.end_date)
			},
			// 减数
			reduceCourseNum(num,item){
				if(num === '1'){
					if(this.list.allowed_purchase_quantity == 0 || this.data.isLimit == false){
						return false
					}
					return this.list.allowed_purchase_quantity--
				}else if(num === '2'){
					if(this.list.purchase_course == 0 || this.data.isGiveCourse == false){
						return false
					}
					return this.list.purchase_course--
				}else if(num === '3'){
					if(this.list.give_course == 0 || this.data.isGiveCourse == false){
						return false
					}
					return this.list.give_course--
				}else if(num === '4'){
					if(item.limit_course == 0 || item.isOpenNum == false){
						return false
					}
					return item.limit_course--
				}
			},
			// 家数
			addCourseNum(num,item){
				if(num === '1'){
					if( this.data.isLimit == false){
						return false
					}
					return this.list.allowed_purchase_quantity++
				}else if(num === '2'){
					if(this.data.isGiveCourse == false){
						return false
					}
					return this.list.purchase_course++
				}else if(num === '3'){
					if(this.data.isGiveCourse == false){
						return false
					}
					return this.list.give_course++
				}else if(num === '4'){
					if(item.isOpenNum == false){
						return false
					}
					return item.limit_course++
				}
			},
			courseTitle(event,item,index){
				let info = item
				info.actTitleNum = event.detail.cursor
				this.$set(this.list.course_msg,index,info)
			},
			//添加表单收集信息
			addForm(){
				uni.setStorageSync('currentChooseTime',this.list.startTime)
				uni.setStorageSync('currentChoosedata',this.list.startDate)
				uni.setStorageSync('endChooseTime',this.list.endTime)
				uni.setStorageSync('endChoosedata',this.list.endDate)
				if(this.page_operate == 'edit'){
					uni.setStorageSync('editActAdd',this.editAct)
				}else{
					uni.setStorageSync('editActAdd',this.editAct)
				}
				uni.navigateTo({
					url:'./form/addForm?store_id=' + this.store_id
				})
			},
			inviteStaff(){
				uni.navigateTo({
					url:'./invite/inviteStaff'
				})
			},
			//是否自动增加名额
			switch1ChangeNum(e){
				this.data.addNum =  e.target.value
				if(e.target.value == true){
					this.list.enable_auto_add_allowed_total = 1
				}else{
					this.list.enable_auto_add_allowed_total = 0
				}
				console.log(this.data.addNum,'是否自动增加名额')
			},
			//是否开启限购
			switch1ChangeLimit(e){
				this.data.isLimit =  e.target.value
				if(e.target.value == true){
					this.list.enable_allowed_purchase_quantity = 1
				}else{
					this.list.allowed_purchase_quantity = 0
					this.list.enable_allowed_purchase_quantity = 0
				}
				console.log(this.data.isLimit,'是否开启限购')
				console.log(this.list.enable_allowed_purchase_quantity,'this.list.enable_allowed_purchase_quantity')
				console.log(this.list.allowed_purchase_quantity,'this.list.allowed_purchase_quantity')
			},
			//是否开启买课赠课环节
			switch1ChangeCourse(e){
				this.data.isGiveCourse =  e.target.value
				if(e.target.value == true){
					this.list.enable_purchase_course_then_give_course = 1
				}else{
					this.list.purchase_course = 0
					this.list.give_course = 0
					this.list.enable_purchase_course_then_give_course = 0
				}
				console.log(this.data.isGiveCourse,'是否开启买课赠课环节')
			},
			//是否开启虚拟成团
			switch1ChangeGroup(e){
				this.data.VirtualGroup =  e.target.value
				if(e.target.value == true){
					this.list.enable_virtual_group_purchase = 1
				}else{
					this.list.enable_virtual_group_purchase = 2
					this.list.end_group_purchase_type = ''
				}
				console.log(this.data.VirtualGroup,'是否开启虚拟成团')
			},
			//是否开启团长福利介绍
			switch1ChangeWelfare(e){
				this.data.isWelfare =  e.target.value
				if(e.target.value == true){
					this.list.enable_head_welfare = 1
				}else{
					this.list.enable_head_welfare = 0
				}
				console.log(this.data.isWelfare,'是否开启团长福利介绍')
			},
			//是否显示参加他人的团
			switch1ChangeShow(e){
				this.data.showOther =  e.target.value
				if(e.target.value == true){
					this.list.show_other_group_purchase = 1
				}else{
					this.list.show_other_group_purchase = 0
				}
				console.log(this.data.showOther,'是否显示参加他人的团')
			},
			// 参与活动   活动课程是否开启限购
			switch1ChangeCourseNum(event,item){
				item.isOpenNum =  event.target.value
				if(event.target.value == false){
					item.limit_course = 0
				}
				console.log(item.limit_course,'活动课程是否开启限购')
			},
			//是否给家长赠送购物卡
			switch1ChangeGive(event,item,index){
				console.log(event)
				item.isGive =  event.target.value
				if(event.target.value ==true){
					item.give_cash_shopping_card_to_parents = 1
				}else{
					item.give_cash_shopping_card_to_parents = 0
					item.cash_shopping_card_amount = ''
				}
				if(this.page_operate == 'edit'){
					let data = item
					data.isGive =  event.target.value
					this.$set(this.list.course_msg,index,data)
				}
				console.log(item.isGive,'是否给家长赠送购物卡')
			},
			// 是否开启音乐
			switchMusic(e){
				if(e.target.value){
					console.log(e.target.value);
					this.list.music = 1
					console.log(this.list.music);
				}else{
					this.list.music = 2
					console.log(this.list.music);
				}
			},
			// 删除指定轮播图图片
			delSwiper(index){
				this.list.image.splice(index,1)
				this.editAct.image.splice(index,1)
				console.log(this.list.image,'删除后新数组')
			},
			// 获取表单数据
			getActForm(item){
				this.list.actFormMsg = item
			},
			//	科目选择
			checkbox(data){
				this.subjects.forEach(item => {
					if(item.id == data.id && item.is_check==0){
						item.is_check = 1
						this.subjectId = data.id
						this.list.subjects_id = this.subjectId
						console.log(this.subjectId);
					}else if (item.id == data.id && item.is_check==1){
						item.is_check = 0
						this.subjectId = data.id
						this.list.subjects_id = this.subjectId
						console.log(this.subjectId);
					}
				})
			}
		}
	}
</script>

<style>
	.go-home{
		width: 60upx;
		height: 60upx;
		border-radius: 50%;
		position: fixed;
		border: 1upx solid #DEDEDE;
		top: 50upx;right: 50upx;
		z-index: 999;
	}
	.go-home>image{
		width: 100%;
		height: 100%;
		border-radius: 50%;
	}
	.shop-name{
		width: 100%;
		padding:0 20upx;
		box-sizing: border-box;
		color: #333;
		font-size: 28upx;
		text-align: center;
		background: #F5F5F5;
	}
	.shop-name>view{
		padding: 20upx 0;
		box-sizing: border-box;
		border-bottom: 1upx solid #DEDEDE;
		display: flex;
		justify-content: space-between;
	}
	.shop-name>view:last-child{
		border-bottom: 0;
	}
	.shop-name>view>image{
		width: 40upx;
		height: 40upx;
	}
	/* 发布成功弹框 */
	.popup_box_de{
		height: 616upx;
		width: 592upx;
		background: #FFFFFF;
		border-radius: 16upx;
		padding-top: 78upx;
		box-sizing: border-box;
		/* z-index: 999; */
	}
	.popup_box_succed-img{
		width: 140upx;
		height: 184upx;
		margin: 0 auto;
	}
	.popup_box_succed-img>image{
		width: 100%;
		height: 100%;
	}
	.popup_box-title-succed{
		text-align: center;
		color: #333333;
		font-size: 34upx;
		margin-top: 58upx;
		font-weight: 800;
	}
	.popup_box-invite{
		width: 480upx;
		height: 80upx;
		line-height: 80upx;
		color: #FFFFFF;
		text-align: center;
		margin: 0 auto;
		margin-top: 76upx;
		background: linear-gradient(to right,#FE9543,#FF664F);
		border-radius: 44upx;
		box-shadow: 0 8upx 16upx 0 rgba(166, 13, 0, 0.23);
		font-size: 32upx;
	}
	.popup_box-tip{
		color: #999999;
		text-align: center;
		font-size: 24upx;
		margin-top: 10upx;
	}
	page{
		background: #F3F3F4;
	}
	.special-group{
		width: 100%;
		height:100%;
		margin-bottom: 110upx;
	}
	.special-group-swiper{
		width: 100%;
		background: #FFFFFF;
		padding-bottom: 30upx;
		box-sizing: border-box;
	}
	.special-group-swiper>view:first-child,.swiper,.swiper>swiper-item>image{
		width: 100%;
	}
	.swiper,.swiper>swiper-item>image{
		width: 100%;
		height: 1060rpx;
	}
	.swiper .discounts-page{
		position: relative;
	}
	.swiper .discounts-page>view{
		position: absolute;
		top: 20upx;left: 0;
		width: 106upx;
		height: 64upx;
		line-height: 64upx;
		background: rgba(0,0,0,0.5);
		border-radius: 0 200upx 200upx 0;
		color: #FFFFFF;
		font-size: 28upx;
		text-align: center;
	}
	.choose-img{
		margin-top: 20upx;
		width: 100%;
		padding: 0 30upx;
		box-sizing: border-box;
	}
	.choose-swiper-img{
		color: #999999;
		font-size: 24upx;
	}
	.choose-img-details{
		display: flex;
		justify-content: flex-start;
		margin-top: 40upx;
	}
	.choose-img-common{
		width: 166upx;
		height: 94upx;
		margin-right: ;
		background: #F5F5F5;
		position: relative;
		text-align: center;
	}
	.updata{
		position: absolute;
		top: 50%;left: 50%;
		transform: translate(-50%,-50%);
		width: 88upx;
		height: 32upx;
		line-height: 32upx;
		color: #FFFFFF;
		text-align: center;
		font-size: 22upx;
		background: rgba(0, 0, 0, 0.4);
		border-radius: 16upx;
		/* z-index: 999; */
	}
	.delete-upload-imf{
		width: 32upx;
		height: 32upx;
		position: absolute;
		/* z-index: 777; */
		top: -18upx;right: 0upx;
	}
	.updata-img,.choose-img-detail{
		width: 42upx;
		height: 33upx;
		margin-top: 18upx;
	}
	.upload-img{
		color: #999999;
		font-size: 22upx;
	}
	.img-num{
		width: 30upx;
		line-height: 24upx;
		border-radius: 0 12upx 12upx 0;
		background: rgba(0, 0, 0, 0.5);
		position: absolute;
		top: 0;left: 0;
		/* z-index: 777; */
		color: #FFFFFF;
		font-size: 22upx;
	}
	.act-time-title{
		width: 100%;
		padding: 30upx;
		box-sizing: border-box;
		background: #FFFFFF;
		margin-top: 20upx;
	}
	.explain-title{
		display: flex;
		width: 100%;
	}
	.explain-title>view:first-child{
		width: 8upx;
		height: 32upx;
		background: #FF8B46;
		margin-top: 6upx;
	}
	.explain-title>view:last-child{
		color: #333333;
		font-size: 30upx;
		margin-left: 10upx;
	}
	.act-title-tip{
		width: 100%;
		margin-top: 20upx;
		position: relative;
	}
	.act-title-tip>textarea{
		width: 100%;
		height: 120upx;
		background: #F5F5F5;
		border-radius: 4upx;
		padding: 20upx 20upx 10upx;
		box-sizing: border-box;
		font-size: 28upx;
	}
	.act-title-tip>view{
		color: #999999;
		font-size: 22upx;
		position: absolute;
		bottom: 10upx;right: 20upx;
	}
	.act-time-set{
		width: 100%;
		line-height: 80upx;
		display: flex;
		background: #F5F5F5;
		border-radius: 4upx;
		font-size: 28upx;
		margin-top: 20upx;
	}
	.act-time-set>view:first-child{
		color: #333333;
		width: 30%;
		background: #ECECEC;
		text-align: center;
	}
	.start-data{
		width: 30%;
		color: #333333;
		padding-left: 20upx;
		box-sizing: border-box;
	}
	.start-time{
		width: 30%;
		color: #333333;
	}
	.give-course-coupon,.act-course-set,.group-set{
		width: 100%;
		padding: 30upx;
		box-sizing: border-box;
		background: #FFFFFF;
		margin-top: 20upx;
	}
	.act_explain-title{
		width: 100%;
		display: flex;
		justify-content: space-between;
	}
	.explain_tip{
		color: #999999;
		font-size: 24upx;
		border: none;
	}
	.explain_tip>image{
		width: 100upx;
		height: 60upx;
	}
	.act-title,.clustering-num{
		width: 100%;
		height: 80upx;
		line-height: 80upx;
		background: #F5F5F5;
		border-radius: 4upx;
		margin-top: 20upx;
		display: flex;
	}
	.act-title>view{
		width: 36%;
		background: #ECECEC;
		text-align: center;
		font-size: 28upx;
		color: #333333;
	}
	.act-title>input{
		width: 64%;
		height: 100%;
		padding: 20upx;
		box-sizing: border-box;
		text-align: left;
		font-size: 28upx;
	}
	.add-num,.virtual-join,.buy-course-count{
		width: 100%;
		margin-top: 20upx;
	}
	.add-num>view:first-child{
		width: 100%;
		height: 80upx;
		background: #ECECEC;
		padding:10upx 20upx;
		box-sizing: border-box;
		display: flex;
		justify-content: space-between;
	}
	.add-num>view>text{
		color: #333333;
		font-size: 28upx;
		display: inline-block;
		margin-top: 10upx;
	}
	.add-num>view>image{
		width: 100upx;
		height: 60upx;
		margin-left: 84upx;
		/* margin-top: 10upx; */
	}
	.add-num>view:last-child{
		color: #999999;
		font-size: 24upx;
		margin-top: 6upx;
	}
	.virtual-join>view:first-child{
		width: 100%;
		height: 80upx;
		line-height: 80upx;
		background: #F5F5F5;
		border-radius: 4upx;
		display: flex;
	}
	.virtual-join>view:first-child>view{
		width: 40%;
		color: #333333;
		font-size: 28upx;
		text-align: center;
		background: #ECECEC;
	}
	.virtual-join>view:first-child>input{
		width: 60%;
		height: 80upx;
		text-align: left;
		padding-left: 20upx;
		font-size: 28upx;
	}
	.virtual-join>view:last-child,.buy-course-count>view:last-child{
		color: #999999;
		font-size: 24upx;
		margin-top: 6upx;
	}
	.buy-course-count-set{
		width: 100%;
		height: 80upx;
		display: flex;
		background: #F5F5F5;
		border-radius: 4upx;
	}
	.buy-course-count-set>view:first-child{
		width: 70%;
		height: 80upx;
		background: #ECECEC;
		display: flex;
		justify-content: space-between;
		padding: 10upx 20upx;
		box-sizing: border-box;
	}
	.buy-course-count-set>view:first-child>text{
		color: #333333;
		font-size: 28upx;
		display: inline-block;
		margin-top: 14upx;
	}
	.buy-course-count-set>view:first-child>image{
		width: 100upx;
		height: 60upx;
	}
	.buy-course-amount{
		width: 30%;
		height: 80upx;
		display: flex;
		justify-content: space-around;
	}
	.buy-course-amount>image{
		width: 48upx;
		height: 48upx;
		margin-top: 16upx;
	}
	.buy-course-amount>view{
		color: #333333;
		line-height: 80upx;
		font-size: 30upx;
	}
	.give-course-tip{
		color: #999999;
		font-size: 24upx;
		margin-top: 10upx;
	}
	.buy-give-course{
		color: #333333;
		font-size: 28upx;
		margin-top: 30upx;
	}
	.buy-give-course>text{
		color: #FF391F;
	}
	.buy-give-course-num{
		width: 100%;
		display: flex;
		margin-top: 20upx;
	}
	.buy-give-course-num image{
		width: 48upx;
		height: 48upx;
	}
	.buy-give-course-details{
		display: flex;
	}
	.buy-give-course-details>view{
		margin: 0 20upx;
		width: 156upx;
		height: 48upx;
		line-height: 48upx;
		display: flex;
		justify-content: space-between;
		background: #F2F2F2;
		border-radius: 24upx;
	}
	.buy-give-course-details>text{
		color: #333333;
		font-size: 28upx;
		line-height: 48upx;
	}
	.buy-give-course-details>view>view{
		color: #333333;
		font-size: 30upx;
	}
	.clustering-num>view{
		width: 30%;
		line-height: 80upx;
		background: #ECECEC;
		text-align: center;
		color: #333333;
		font-size: 28upx;
	}
	.clustering-num>input{
		width: 70%;
		height: 80upx;
		line-height: 80upx;
		padding: 0 20upx;
		font-size: 28upx;
		text-align: left;
	}
	.is-open-group{
		width: 100%;
		margin-top: 20upx;
	}
	.is-open-group-tip{
		color: #999999;
		font-size: 24upx;
		margin-top: 6upx;
	}
	.is-open-group-content{
		width: 100%;
		/* height: 254upx; */
		background: #F5F5F5;
		border-radius: 4upx;
	}
	.is-open-group-choose{
		width: 100%;
		height: 31%;
		background: #ECECEC;
		line-height: 80upx;
		padding: 0 20upx;
		box-sizing: border-box;
		display: flex;
		justify-content: space-between;
	}
	.is-open-group-choose>text{
		color: #333333;
		font-size: 28upx;
	}
	.is-open-group-choose>image{
		width: 100upx;
		height: 60upx;
		margin-top: 10upx;
	}
	.is-open-group-time{
		width: 100%;
		padding: 20upx 20upx 30upx;
		box-sizing: border-box;
	}
	.is-open-group-hour>radio-group>label{
		margin-top: 10upx;
	}
	.is-open-group-hour>radio-group>label>view>radio{
		transform: scale(0.7);
	}
	.is-open-group-hour>radio-group>label:first-child>view>radio{
		margin-top: 4upx;
	}
	.is-open-group-hour>radio-group>label>view{
		color: #333333;
		font-size: 28upx;
		margin-left: 10upx;
	}
	.is-open-group-hour>radio-group>label:first-child>view>text{
		line-height: 64upx;
	}
	.is-open-group-hour>radio-group>label>view>input{
		color: #FF391F;
		font-size: 28upx;
		width: 112upx;
		height: 64upx;
		line-height: 64upx;
		background: #FFFFFF;
		padding: 0 20upx;
		box-sizing: border-box;
		text-align: center;
	}
	.is-open-group-hour>radio-group>label:last-child>view:last-child{
		margin-top: 4upx;
	}
	/* .is-open-group-hour>radio-group>label>view>text{
		display: inline-block;
		width: 96upx;
		height: 64upx;
		line-height: 64upx;
		text-align: center;
		background: #FFFFFF;
		color: #FF391F;
	} */
	.group-defeated{
		width: 100%;
		height: 182upx;
		background: #F5F5F5;
		border-radius: 4upx;
		margin-top: 30upx;
	}
	.group-defeated-title{
		width: 100%;
		line-height: 80upx;
		background: #ECECEC;
		padding: 0 20upx;
		box-sizing: border-box;
		color: #333333;
		font-size: 28upx;
	}
	.group-defeated-details{
		width: 100%;
		padding: 32upx 20upx;
		box-sizing: border-box;
		display: flex;
		justify-content: space-between;
	}
	.group-defeated-details image{
		width: 32upx;
		height: 32upx;
		margin-top: 2upx;
	}
	.group-defeated-content,radio-group{
		display: flex;
	}
	.group-defeated-content>radio-group>label>view{
		color: #333333;
		font-size: 28upx;
	}
	.group-defeated-content>radio-group>label>view:last-child{
		margin-top: 4upx;
	}
	.group-defeated-content>radio-group>label>view>radio{
		transform: scale(0.7);
	}
	.header-welfare{
		width: 100%;
		/* height: 200upx; */
		margin-top: 20upx;
		background: #F5F5F5;
		border-radius: 4upx;
	}
	.header-welfare-title{
		width: 100%;
		height: 80upx;
		line-height: 80upx;
		background: #ECECEC;
		padding: 0 20upx;
		box-sizing: border-box;
		display: flex;
		justify-content: space-between;
	}
	.header-welfare-title>text{
		color: #333333;
		font-size: 28upx;
	}
	.header-welfare-title>image{
		width: 100upx;
		height: 60upx;
		margin-top: 10upx;
	}
	.header-welfare-input{
		width: 100%;
		height: 120upx;
	}
	.header-welfare-input>textarea{
		width: 100%;
		height: 100%;
		padding: 20upx;
		box-sizing: border-box;
		font-size: 28upx;
	}
	.is-show-other-group{
		width: 100%;
		margin-top: 20upx;
	}
	.is-show-other-group-title{
		width: 100%;
		height: 80upx;
		line-height: 80upx;
		padding: 0 20upx;
		box-sizing: border-box;
		background: #ECECEC;
		display: flex;
		justify-content: space-between;
	}
	.is-show-other-group-title>text{
		color: #333333;
		font-size: 28upx;
	}
	.is-show-other-group-title>image{
		width: 100upx;
		height: 60upx;
		margin-top: 10upx;
	}
	.is-show-other-group-tip{
		color: #999999;
		font-size: 24upx;
		margin-top: 6upx;
	}
	.join-act-course{
		width: 100%;
		background: #FFFFFF;
		margin-top: 20upx;
		padding: 0 30upx;
		box-sizing: border-box;
		padding-bottom: 16upx;
	}
	.course_type-title{
		width: 100%;
		height: 100upx;
		position: relative;
	}
	.course_type-title>view:first-child{
		width: 236upx;
		height: 66upx;
		background-image: url(https://tool.tuanhaoke.cn/static/image/home/home_image_background.png);
		background-repeat: no-repeat;
		background-size: 1005 100%;
		text-align: center;
		font-size: 30upx;
		color: #FFFFFF;
		line-height: 66upx;
		position: absolute;
		top: -4upx;left: 50%;
		transform: translate(-50%,0);
	}
	.join-act-course-details{
		width: 100%;
		padding: 32upx 20upx 20upx;
		box-sizing: border-box;
		background: #FFFFFF;
		box-shadow: 0 2upx 22upx 0 rgba(0, 0, 0, 0.09);
		border-radius: 10upx;
		position: relative;
	}
	.join-act-course-details>image{
		width: 40upx;
		height: 40upx;
		position: absolute;
		top: -20upx;
	}
	.join-course-title{
		width: 100%;
		display: flex;
		justify-content: space-between;
		margin-top: 20upx;
	}
	.join-course-title-img{
		width: 160upx;
		height: 120upx;
		position: relative;
	}
	.no-img{
		width: 160upx;
		height: 120upx;
		position: relative;
		background: #F5F5F5;
	}
	.no-img>image{
		width: 42upx;
		height: 33upx;
		margin-top: 30upx;
		margin-left: 60upx;
	}
	.no-img>view{
		width: 100%;
		text-align: center;
		color: #999999;
		font-size: 22upx;
	}
	.join-course-title-img>image{
		width: 100%;
		height: 100%;
		position: absolute;
		top: 0;left: 0;
	}
	.masking{
		width: 100%;
		height: 100%;
		background: rgba(0, 0, 0, 0.2);
		position: absolute;
		top: 0;left: 0;
		/* z-index: 666; */
	}
	.change-photo{
		width: 104upx;
		height: 32upx;
		line-height: 32upx;
		background: rgba(0, 0, 0, 0.4);
		border-radius: 2upx;
		position: absolute;
		top: 50%;left: 50%;
		transform: translate(-50%,-50%);
		color: #FFFFFF;
		font-size: 22upx;
		text-align: center;
	}
	.join-course-title-input{
		width: 680upx;
		height: 120upx;
		background: #F5F5F5;
		position: relative;
	}
	.join-course-title-input>textarea{
		width: 100%;
		height: 100%;
		font-size: 28upx;
		padding: 20upx;
		box-sizing: border-box;
	}
	.join-course-title-input>view{
		color: #999999;
		font-size: 22upx;
		position: absolute;
		bottom: 10upx;right: 20upx;
	}
	.commodity-original-price,.act-address,.alone-buy-discounts,.give-shopping-card-money,.join-group-price-content,.restricted-purchase-content{
		width: 100%;
		margin-top: 20upx;
		height: 80upx;
		display: flex;
		background: #F5F5F5;
		border-radius: 4upx;
	}
	.commodity-original-price>view,.join-group-price-content>view,.act-address-title{
		width: 30%;
		line-height: 80upx;
		background: #ECECEC;
		font-size: 28upx;
		text-align: center;
	}
	.alone-buy-discounts>view,.give-shopping-card-money>view{
		width: 30%;
		background: #ECECEC;
		font-size: 26upx;
		padding: 8upx 20upx;
		box-sizing: border-box;
	}
	.commodity-original-price>input,.alone-buy-discounts>input,.join-group-price-content>input,.give-shopping-card-money>input{
		width: 70%;
		text-align: left;
		padding: 0 20upx;
		box-sizing: border-box;
		height: 80upx;
		font-size: 28upx;
	}
	.join-group-price{
		width: 100%;
	}
	.join-group-price-tip,.restricted-purchase-tip,.give-shopping-card-tip{
		color: #999999;
		font-size: 24upx;
		margin-top: 6upx;
	}
	.restricted-purchase,.give-shopping-card,.give-shopping-card{
		width: 100%;
		margin-top: 20upx;
	}
	.restricted-purchase-content-open{
		width: 70%;
		height: 80upx;
		background: #ECECEC;
		display: flex;
		justify-content: space-between;
		padding: 10upx 40upx 10upx 20upx;
		box-sizing: border-box;
	}
	.restricted-purchase-content-open>text{
		color: #333333;
		font-size: 28upx;
		margin-top: 14upx;
	}
	.restricted-purchase-content-open>image,.give-shopping-card-content>image{
		width: 100upx;
		height: 60upx;
	}
	.restricted-purchase-content-num{
		width: 30%;
		display: flex;
		justify-content: space-around;
		height: 80upx;
	}
	.restricted-purchase-content-num>view{
		line-height: 80upx;
		font-size: 30upx;
		color: #333333;
	}
	.restricted-purchase-content-num>image{
		width: 48upx;
		height: 48upx;
		margin-top: 16upx;
	}
	.give-shopping-card-content{
		width: 100%;
		height: 80upx;
		background: #ECECEC;
		display: flex;
		justify-content: space-between;
		padding: 10upx 20upx;
		box-sizing: border-box;
	}
	.give-shopping-card-content>text{
		color: #333333;
		font-size: 28upx;
		display: inline-block;
		margin-top: 14upx;
	}
	.give-shopping-card-details{
		width: 100%;
		margin-top: 30upx;
	}
	.give-shopping-card-details>view:first-child{
		color: #333333;
		font-size: 28upx;
	}
	.give-shopping-card-details>view:first-child>text{
		color: #FF391F;
	}
	.give-shopping-card-details>view:last-child{
		color: #999999;
		font-size: 24upx;
		margin-top: 20upx;
	}
	.act-address-choose{
		width: 77%;
		display: flex;
		justify-content: space-between;
		padding: 20upx 20upx;
		box-sizing: border-box;
	}
	.act-address-choose>image{
		width: 12upx;
		height: 20upx;
		margin-top: 10upx;
	}
	.act-address-choose>text{
		font-size: 28upx;
		color: #999999;
	}
	.subject-details{
		width: 100%;
		margin-top: 20upx;
		background: #F5F5F5;
		border-radius: 4upx;
	}
	.subject-details-title{
		width: 100%;
		height: 80upx;
		background: #ECECEC;
		display: flex;
	}
	.subject-details-title>text{
		display: inline-block;
		color: #333333;
		font-size: 28upx;
		line-height: 80upx;
	}
	.subject-details-title>text:nth-child(1){
		margin-left: 224upx;
	}
	.subject-details-title>text:nth-child(2){
		color: #999999;
		margin-left: 10upx;
	}
	.subject-details-title>image{
		width: 20upx;
		height: 20upx;
		margin-top: 34upx;
	}
	.text-img-content{
		width: 100%;
		padding-top: 20upx;
		box-sizing: border-box;
		background: #F5F5F5;
	}
	.pack-up-details{
		width: 100%;
		height: 64upx;
		display: flex;
		background: #ECECEC;
	}
	.pack-up-details>text{
		display: inline-block;
		color: #333333;
		font-size: 28upx;
		line-height: 64upx;
		margin-left: 274upx;
	}
	.pack-up-details>image{
		width: 14upx;
		height: 14upx;
		transform: rotate(-90deg);
		margin-left: 10upx;
		margin-top: 26upx;
	}
	.text-img-details{
		width: 100%;
		padding: 0 20upx;
		padding-bottom: 20upx;
		box-sizing: border-box;
	}
	.text-img-details>view:last-child{
		margin-bottom: 0;
	}
	.img-details{
		width: 100%;
		/* height: 340upx; */
		background: #ECECEC;
		position: relative;
		margin-bottom: 56upx;
	}
	.text-details{
		width: 100%;
		height: 340upx;
		background: #ECECEC;
		position: relative;
		margin-bottom: 56upx;
	}
	.img-content{
		width: 100%;
		height: 100%;
	}
	.delete-img{
		width: 38upx;
		height: 38upx;
		position: absolute;
		top: -20upx;left: -20upx;
		/* z-index: 777; */
	}
	.rank-img{
		width: 38upx;
		height: 38upx;
		position: absolute;
		top: -20upx;right: -20upx;
		/* z-index:777; */
	}
	.text-details>textarea{
		width: 100%;
		height: 100%;
		font-size: 28upx;
		color: #333333;
		padding: 20upx;
		box-sizing: border-box;
	}
	.add-img-text{
		width: 100%;
		display: flex;
		justify-content: space-between;
	}
	.add-details{
		width: 48%;
		height: 64upx;
		display: flex;
		background: #FFFFFF;
	}
	.change-img{
		width: 230upx;
		height: 48upx;
		line-height: 48upx;
		text-align: center;
		border-radius: 40upx;
		position: absolute;
		top: 50%;left: 50%;
		transform: translate(-50%,-50%);
		color: #FFFFFF;
		font-size: 28upx;
		background: rgba(0,0,0,0.4);
	}
	.add-details>image{
		width: 40upx;
		height: 40upx;
		margin-left: 68upx;
		margin-top: 12upx;
		margin-right: 10upx;
	}
	.add-details>text{
		color: #FF8B46;
		font-size: 28upx;
		line-height: 64upx;
	}
	.add-course{
		width: 600upx;
		height: 80upx;
		line-height: 80upx;
		text-align: center;
		margin: 0 auto;
		margin-top: 32upx;
		font-size: 32upx;
		color: #FFFFFF;
		background: linear-gradient(to right,#FE9543,#FF664F);
		border-radius: 44upx;
		box-shadow: 0 8upx 16upx 0 rgba(166, 13, 0, 0.23);
	}
	.apply-msg,.act-detail{
		width: 100%;
		padding: 30upx;
		box-sizing: border-box;
		background: #FFFFFF;
		margin-top: 20upx;
	}
	.apply-msg-contain{
		width: 100%;
		/* height: 160upx; */
		background: #F5F5F5;
		border-radius: 4upx;
		margin-top: 20upx;
	}
	.apply-msg-all{
		width: 100%;
		height: 80upx;
		line-height: 80upx;
		padding-left: 20upx;
		box-sizing: border-box;
		background: #ECECEC;
		font-size: 28upx;
		color: #333333;
	}
	.apply-msg-content{
		width: 100%;
		height: 50%;
		line-height: 80upx;
		display: flex;
	}
	.apply-msg-content>text{
		display: inline-block;
		color: #333333;
		font-size: 28upx;
		margin-left: 20upx;
	}
	.add-form-tip{
		text-align: center;
		color: #DD524D;
		font-size: 24upx;
		margin-top: 20upx;
		margin-bottom: 100rpx;
	}
	.add-form-tip2{
		text-align: center;
		color: #999;
		font-size: 24upx;
		margin-top: 20upx;
		margin-bottom: 100rpx;
	}
	.act-detail-contain{
		width: 100%;
		padding: 30upx 20upx;
		box-sizing: border-box;
		background: #F5F5F5;
		border-radius: 4upx;
		margin-top: 20upx;
	}
	.act-status{
		width: 100%;
		height: 100upx;
		background: #FFFFFF;
		display: flex;
		justify-content: space-around;
		position: fixed;
		left: 0;bottom: 0;
		z-index: 888;
	}
	.act-common{
		width: 220upx;
		height: 64upx;
		line-height: 64upx;
		margin-top: 18upx;
		text-align: center;
		font-size: 28upx;
		border: 2upx solid #FF8B46;
		border-radius: 44upx;
		color: #FF8B46;
	}
	.publish{
		border: 0;
		color: #FFFFFF;
		background: linear-gradient(to right,#FE9543,#FF664F);
		box-shadow: 0 4upx 12upx 0 rgba(250, 176, 48, 0.55);
	}
	.account-selection{
		display: inline-block; 
		font-size: 28upx; 
		margin-right: 50upx;
	}
</style>
